You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by le...@heisterberg.dk on 2006/02/19 14:42:19 UTC

[dbcp] Anyone who knows how the connection pool is closed upon server shutdown?

Hi there,

I writing a custom connection pool for a project under Tomcat (written as 
the dbcp using the javax.naming.spi.ObjectFactory interface). The 
connection pool doesn't implement the javax.sql.DataSource interface. 

For the connection pool I need some lifecycle management and in that 
regard I was wondering how dbcp makes sure all the connections are closed 
when the application server shuts down. I can see from the source that the 
org.apache.commons.dbcp.BasicDataSource class has a close() method but I 
cannot see how it is called upon server termination.

Does any of you guys know?

Mikkel Heisterberg