tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Gregg" <john.gr...@techarch.com>
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.

john


-----Original Message-----
From:
tomcat-user-return-24383-john.gregg=techarch.com@jakarta.apache.org
[mailto:tomcat-user-return-24383-john.gregg=techarch.com@jakarta.apache.
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 
work. 

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
pool.

Mime
View raw message