This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes basic connection pooling question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "basic connection pooling question" Watch "basic connection pooling question" New topic
Author

basic connection pooling question

bart zagers
Ranch Hand

Joined: Feb 05, 2003
Posts: 234
Hey,
I'm new to JDBC and I am looking at a connection pooling mechanism. OnCore Servlets
I found a basic implementation.
But in ConnectionPool.getConnection() I see

that Connection.isClosed() is used (see ($$$$))with a comment that it returns true if the connection has timed out.
I assume this is wrong (based on the java documentation), but how should I replace this test if I want that my method returns an open connection?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: basic connection pooling question