From: Doug F. <th...@us...> - 2001-11-21 18:14:52
|
User: thedug Date: 01/11/21 10:14:51 Modified: src/main/org/jboss/resource/connectionmanager ManagedConnectionPoolFactory.java Log: destroy() should actually close the connection so that the tcp connection isn't left open. Revision Changes Path 1.3 +16 -0 jbosscx/src/main/org/jboss/resource/connectionmanager/ManagedConnectionPoolFactory.java Index: ManagedConnectionPoolFactory.java =================================================================== RCS file: /cvsroot/jboss/jbosscx/src/main/org/jboss/resource/connectionmanager/ManagedConnectionPoolFactory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ManagedConnectionPoolFactory.java 2001/09/11 18:38:58 1.2 +++ ManagedConnectionPoolFactory.java 2001/11/21 18:14:51 1.3 @@ -63,6 +63,22 @@ pool = null; } + /** + * Permanently closes an object, after it is removed from the pool. The + * object will not be returned to the pool - after this, it is gone. This + * is called when the pool shrinks, and when the pool is shut down. + */ + public void deleteObject(Object pooledObject) { + try{ + ((ManagedConnection)pooledObject).destroy(); + }catch(ResourceException e) { + log.println("Unable to destroy ManagedConnection: "+e); + } + + } + + + /** * Creates a new ManagedConnection with the specified parameters. * |
From: Scott M S. <st...@us...> - 2001-11-21 19:41:17
|
User: starksm Date: 01/11/21 11:41:16 Modified: src/main/org/jboss/resource/connectionmanager ManagedConnectionPoolFactory.java Log: Fix the bad check-in by thedug Revision Changes Path 1.4 +9 -5 jbosscx/src/main/org/jboss/resource/connectionmanager/ManagedConnectionPoolFactory.java Index: ManagedConnectionPoolFactory.java =================================================================== RCS file: /cvsroot/jboss/jbosscx/src/main/org/jboss/resource/connectionmanager/ManagedConnectionPoolFactory.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ManagedConnectionPoolFactory.java 2001/11/21 18:14:51 1.3 +++ ManagedConnectionPoolFactory.java 2001/11/21 19:41:16 1.4 @@ -68,14 +68,18 @@ * object will not be returned to the pool - after this, it is gone. This * is called when the pool shrinks, and when the pool is shut down. */ - public void deleteObject(Object pooledObject) { - try{ + public void deleteObject(Object pooledObject) + { + try + { ((ManagedConnection)pooledObject).destroy(); - }catch(ResourceException e) { - log.println("Unable to destroy ManagedConnection: "+e); } + catch(ResourceException e) + { + log.error("Unable to destroy ManagedConnection: ", e); + } - } + } |