tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Gregg" <>
Subject RE: JDBC Error
Date Fri, 28 Jun 2002 14:39:05 GMT
I'd like to clarify a bit what Ralph said.  If you use a connection pool,
most likely the connections will in fact be open beyond the duration of one
request or even one session.  Your application, however, will get and
release those open connections as needed.  Even though you might still be
making calls like DriverManager.getConnection() and conn.close(), the
connection isn't really being opened and closed on demand.


-----Original Message-----
org]On Behalf Of Ralph Einfeldt
Sent: Friday, June 28, 2002 9:20 AM
To: Tomcat Users List
Subject: AW: JDBC Error

It depend on how you use your connection.

If you open it and hope that sending any command to the 
connection might reopen it if it's closed, that won't 

It's in general not a recommended solution to keep 
connections open for the lifetime of a session.

You should get/release the connection with every request.
To avoid performance penalties you should use a connection

View raw message