Best place to create and shutdown the connection pool?
843841Sep 12 2005 — edited Sep 14 2005I 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.