Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Best place to create and shutdown the connection pool?

843841Sep 12 2005 — edited Sep 14 2005
I have a webapp with one servlet mapped to url "/do" and used to call different actions.

I create the connection pool in the servlet's init() method. So far so good. Three concerns:

1) Will the container (Tomcat 5.5.x) create more than one instance of this servlet?

2) Should I shut down the pool in the servlet's destroy() method.

3) Is destroy called when shutting down tomcat?

Thanks.

PS: I thought about having tomcat handle the pool, but setting it up is not worth it since this is the only app that I'll be running in this server just for my own use.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 12 2005
Added on Sep 12 2005
12 comments
400 views