Caldarale, Charles R wrote:
> 
>> From: Carol Cheung [mailto:cache...@consumercontact.com] 
>> Subject: tomcat database connection pool
>> 
>> In tomcat 5.5, the database connection pool associated with 
>> my application does not seem to "shutdown" when I undeploy 
>> the application.
> 
> You don't say if the DBCP is managed by the container (Tomcat) or by your
> webapp.  If it's the former, the pool will persist for the life of Tomcat
> (but see the link below).  If the latter, your best bet is to implement a
> ServletContextListener that will explicitly shut down the pool when the
> contextDestroyed() method is called.  The servlet spec even uses this
> situation as an example.
> 
> An easier link to follow for the previously reference discussion thread is
> this:
> http://marc.info/?l=tomcat-user&m=123529838331464&w=2
> 
> And the critical messages of the thread:
> http://marc.info/?l=tomcat-user&m=123532841602124&w=2
> http://marc.info/?l=tomcat-user&m=123532986503723&w=2
> 
>  - Chuck
> 
> 

Thank you all for your help. My dbcp is managed in my webapp. I implemented
ServletContextListener with pool shutdown in contextDestroyed. It worked.

Sincerely,
Carol Cheung

-- 
View this message in context: 
http://www.nabble.com/tomcat-database-connection-pool-tp22503977p22602405.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to