You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Carol Cheung <ca...@consumercontact.com> on 2009/03/13 22:37:50 UTC
tomcat database connection pool
Hi,
In tomcat 5.5, the database connection pool associated with my application
does not seem to "shutdown" when I undeploy the application. All the
"postgres" processes are still in existence. (ps -ef | grep postgres)
Can anyone provide some insight as to why clean up of the connection pool is
not taking place? What am I doing wrong? What can I do to fix this?
Thank you very much for your help.
Carol Cheung
--
View this message in context: http://www.nabble.com/tomcat-database-connection-pool-tp22503977p22503977.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat database connection pool
Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
don't forget the best mail archive browser that I have encountered
*http://tinyurl.com/blhhks*
Real URL:
http://tomcat.markmail.org/search/?q=How%20to%20close%20open%20connections%20after%20application%20stop#query:How%20to%20close%20open%20connections%20after%20application%20stop%20list%3Aorg.apache.tomcat.users+page:1+mid:2g4sdltz6wosa4d2+state:results
Caldarale, Charles R wrote:
>> From: Carol Cheung [mailto:cacheung@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
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: tomcat database connection pool
Posted by Carol Cheung <ca...@consumercontact.com>.
Caldarale, Charles R wrote:
>
>> From: Carol Cheung [mailto:cacheung@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: tomcat database connection pool
Posted by Martin Gainty <mg...@hotmail.com>.
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/udat_conpoolset.html
keep your reap time low
keep unused_timeout low
keep aged_timeout low
keep Connection Timeout low
feel free to assign Maximum Connections from default 10.. but not more than 50
HTH
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> From: Chuck.Caldarale@unisys.com
> To: users@tomcat.apache.org
> Date: Fri, 13 Mar 2009 17:03:50 -0500
> Subject: RE: tomcat database connection pool
>
> > From: Carol Cheung [mailto:cacheung@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
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
_________________________________________________________________
Windows Liveā¢ Groups: Create an online spot for your favorite groups to meet.
http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009
RE: tomcat database connection pool
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Carol Cheung [mailto:cacheung@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
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat database connection pool
Posted by Edoardo Panfili <ed...@aspix.it>.
Il 13-03-2009 22:37, Carol Cheung ha scritto:
> Hi,
>
> In tomcat 5.5, the database connection pool associated with my application
> does not seem to "shutdown" when I undeploy the application. All the
> "postgres" processes are still in existence. (ps -ef | grep postgres)
> Can anyone provide some insight as to why clean up of the connection pool is
> not taking place? What am I doing wrong? What can I do to fix this?
>
search "How to close open connections after application stop?"
http://mail-archives.apache.org/mod_mbox/tomcat-users/200902.mbox/browser
at page 6
maybe that you can found some usefull informations.
Edoardo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org