[jboss-cvs] JBossAS SVN: r112677 - projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 22 12:34:28 EST 2012


Author: jesper.pedersen
Date: 2012-02-22 12:34:27 -0500 (Wed, 22 Feb 2012)
New Revision: 112677

Modified:
   projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonPoolImpl.java
Log:
Make sure that max-pool-size is greater than or equal to min-pool-size

Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonPoolImpl.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonPoolImpl.java	2012-02-22 17:03:47 UTC (rev 112676)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/common/CommonPoolImpl.java	2012-02-22 17:34:27 UTC (rev 112677)
@@ -156,6 +156,13 @@
       if (this.minPoolSize != null && this.minPoolSize < 0)
          throw new ValidateException(bundle.invalidNegative(Tag.MIN_POOL_SIZE.getLocalName()));
 
+      if (this.minPoolSize != null && this.maxPoolSize != null)
+      {
+         if (minPoolSize.intValue() > maxPoolSize.intValue())
+            throw new ValidateException(bundle.notValidNumber(minPoolSize.toString(),
+                                                              Tag.MIN_POOL_SIZE.getLocalName()));
+      }
+
       if (this.flushStrategy == null)
          throw new ValidateException(bundle.nullValue(Tag.FLUSH_STRATEGY.getLocalName()));
    }



More information about the jboss-cvs-commits mailing list