[jboss-cvs] JBossAS SVN: r60377 - branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 7 10:48:20 EST 2007


Author: weston.price at jboss.com
Date: 2007-02-07 10:48:20 -0500 (Wed, 07 Feb 2007)
New Revision: 60377

Modified:
   branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/InternalManagedConnectionPool.java
Log:
[JBAS-3911] Rollback to previous min/max behavior until this can be rethought. 

Modified: branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/InternalManagedConnectionPool.java
===================================================================
--- branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/InternalManagedConnectionPool.java	2007-02-07 14:39:13 UTC (rev 60376)
+++ branches/Branch_4_2/connector/src/main/org/jboss/resource/connectionmanager/InternalManagedConnectionPool.java	2007-02-07 15:48:20 UTC (rev 60377)
@@ -117,16 +117,8 @@
       defaultSubject = subject;
       defaultCri = cri;
       this.poolParams = poolParams;
-
-      if(this.poolParams.minSize > poolParams.maxSize)
-      {
-         log.trace("Minimum pool size exceeds maximum pool size. Setting max size to " + this.poolParams.minSize + " Please verify your *-ds.xml file.");
-         this.maxSize = this.poolParams.minSize;
-      }
-      else
-      {
-         this.maxSize = poolParams.maxSize;
-      }
+      this.maxSize = this.poolParams.maxSize;
+      
       this.log = log;
       this.trace = log.isTraceEnabled();
       cls = new ArrayList(this.maxSize);
@@ -139,17 +131,6 @@
       }
       
    }
-
-   private final boolean checkPermitsInvariant()
-   {
-      synchronized (cls)
-      {
-         long numPermits = getAvailableConnections();
-         int inUse = getConnectionInUseCount();
-         int max = poolParams.maxSize;
-         return max == (numPermits + inUse);
-      }
-   }
    
    /**
     * Initialize the pool
@@ -191,7 +172,6 @@
     */
    public ConnectionListener getConnection(Subject subject, ConnectionRequestInfo cri) throws ResourceException
    {
-      assert checkPermitsInvariant() : "illegal numbers of permits";
       
       subject = (subject == null) ? defaultSubject : subject;
       cri = (cri == null) ? defaultCri : cri;




More information about the jboss-cvs-commits mailing list