You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by jm...@apache.org on 2002/07/09 08:43:16 UTC
cvs commit: jakarta-commons-sandbox/jdbc2pool/src/java/org/apache/commons/jdbc2pool ConnectionPool.java
jmcnally 2002/07/08 23:43:16
Modified: jdbc2pool/src/java/org/apache/commons/jdbc2pool
ConnectionPool.java
Log:
commented out problem code that was not absolutely necessary for the pool to
be functional. Added comment as to why the code was not correct.
Revision Changes Path
1.8 +15 -4 jakarta-commons-sandbox/jdbc2pool/src/java/org/apache/commons/jdbc2pool/ConnectionPool.java
Index: ConnectionPool.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/jdbc2pool/src/java/org/apache/commons/jdbc2pool/ConnectionPool.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ConnectionPool.java 5 Jul 2002 08:34:05 -0000 1.7
+++ ConnectionPool.java 9 Jul 2002 06:43:16 -0000 1.8
@@ -391,20 +391,31 @@
*/
private boolean isValid( PooledConnection connection )
{
- try
- {
+ // all this code is commented out because
+ // connection.getConnection() is called when the connection
+ // is returned to the pool and it will open a new logical Connection
+ // which does not get closed, then when it is called again
+ // when a connection is requested it likely fails because a
+ // new Connection has been requested and the old one is still
+ // open. need to either do it right or skip it. null check
+ // was not working either.
+
+ //try
+ //{
// This will throw an exception if:
// The connection is null
// The connection is closed
// Therefore, it would be false.
- connection.getConnection();
+ //connection.getConnection();
// Check for expiration
return !isExpired(connection);
+ /*
}
catch (SQLException e)
{
return false;
}
+ */
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>