Wednesday, January 15, 2003 08:10 AM
What I do is that I use the concept of "listener" (ref your latest Servlet documentation) - With listeners, you can detect when your application throws a particular event (e.g. startup of the application ) and run a particular method when it occurs - In this listener method, you would initialize your connection pool object and save it in the *application* scope for you to be able to retrieve it from anywhere in your application (e.g. each time you need a connection to your DB you would fetch the connection pool from the application scope and ask it for the connection).
The concept of "listeners" and "filters" are often overlooked by developers unfortunately (maybe because they are pretty recent functionality) They are very easy to implement.
Let me know if you need some more help on this matter.