How to use own Connection Pooling in Struts
1 posts in topic
Flat View  Flat View

Posted By:   Yogesh_Beri
Posted On:   Monday, January 13, 2003 08:57 PM

Hello All,
I am new to Struts and I would like to know how to use my own Connection pooling. The application is currently using the Connection Pooling provided by Struts. By I have written my own connection pooling mechanism and would like to use the same.

Thank you in anticipation


Re: How to use own Connection Pooling in Struts

Posted By:   Jerome_Iffrig  
Posted On:   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.


About | Sitemap | Contact