User: mulder
Date: 00/10/19 13:01:21
Modified: src/main/org/jboss/minerva/pools ObjectPool.java
Log:
- Errors in the XA wrapper after the user called close (i.e. during
ejbStore at transaction end) will now propogate and cause the
connection to be dropped if the pool is configured for it.
- If a connection is dropped due to an error, and the pool falls
below the minimum size, a new instance will be created to compensate.
- Oracle DB mapping changed to "Oracle 7". A new "Oracle 8" mapping is
forthcoming. With Oracle 7, you can only have one serialized Java
object per table.
- Pool minimum size cannot be greater than maximum size (unless max is
0 = unlimited).
- Result set wrapper now propogates errors appropriately.
Revision Changes Path
1.13 +11 -1 jboss/src/main/org/jboss/minerva/pools/ObjectPool.java
Index: ObjectPool.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/minerva/pools/ObjectPool.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ObjectPool.java 2000/10/08 15:05:40 1.12
+++ ObjectPool.java 2000/10/19 20:01:20 1.13
@@ -28,7 +28,7 @@
* <LI>Shut it down</LI>
* </OL>
* @see org.jboss.minerva.pools.PooledObject
- * @version $Revision: 1.12 $
+ * @version $Revision: 1.13 $
* @author Aaron Mulder ([EMAIL PROTECTED])
*/
public class ObjectPool implements PoolEventListener {
@@ -180,6 +180,10 @@
if(objects != null)
throw new IllegalStateException(INITIALIZED);
minSize = size;
+ if(maxSize != 0 && minSize > maxSize) {
+ maxSize = minSize;
+ log("WARNING: pool max size set to "+maxSize+" to stay >= min size");
+ }
}
/**
@@ -206,6 +210,10 @@
if(objects != null)
throw new IllegalStateException(INITIALIZED);
maxSize = size;
+ if(maxSize != 0 && minSize > maxSize) {
+ minSize = maxSize;
+ log("WARNING: pool min size set to "+minSize+" to stay <= max size");
+ }
}
/**
@@ -640,6 +648,8 @@
rec.close();
deadObjects.remove(object);
removed = true;
+ if(objects.size() < minSize)
+ createNewObject(false);
} else {
rec.setInUse(false);
removed = false;