DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=37262>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37262 ------- Additional Comments From [EMAIL PROTECTED] 2005-10-27 18:28 ------- Glen, of course I close my connections. But the datasource uses a connection pool and the underlying JDBC connection in not really closed but just returned to the pool. It is the responsibility of the container who manages the datasource to call close() (on the datasource, not the connection) when the context is stopped. Part of the problem is that javax.sql.DataSource does not provide a close() method, only the DBCP DataSource does. But this makes sense to me, because javax.sql.DataSource is an interface for the users, and the appserver should use its own means to cleanup the datasource. The users should not be able to close a datasource, because it is meant to be managed by the appserver. Here is a quote from the JDBC 3.0 spec the mentions that an appserver implementation closes a datasource. "A connection pool manager shuts down a physical connection by calling the method PooledConnection.close. This method is typically called only in certain circumstances: when the application server is undergoing an orderly shutdown, when the connection cache is being reinitialized, or when the application server receives an event indicating that an unrecoverable error has occurred on the connection." The connection manager is DBCP but it has no way of knowing that the tomcat context is stopped. That's why, for a proper integration there needs to be some glueing code that listens to tomcat lifecycle events and notifies DBCP. It doesn't strictly belong to Tomcat, it doesn't strictly belong to DBCP, so that's why it does not exist. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]