commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: Commons Pool/DBCP minIdle Implementation
Date Wed, 20 Aug 2003 23:11:15 GMT
Richard,

I only looked at your patches out of context, so perhaps I missed it, but
where is the code to ensure that:

+        // Check to see if we are below our minimum number of objects
+        // if so enough to bring us back to our minimum.
+        int objectDeficit = getNumIdle() - _minIdle;
+        if ( objectDeficit < 0 ) {
+            for ( int j = 0; j < Math.abs(objectDeficit); j++ ) {
+                addObject();
+            } // for
+        } // if

doesn't cause the number of objects to exceed the maximum?  Unless
_whenExhaustedAction is WHEN_EXHAUSTED_GROW, there is no point in allowing
numActive + numIdle to exceed maxActive, because bollowObject() won't permit
any objects to be borrowed more than maxActive.  The default behavior is to
block until there are fewer than maxActive objects outstanding.

	--- Noel


Mime
View raw message