Home arrow static arrow Java Programming [Archive] - Help setting up web app connection pooling using Jakarta's DBCP
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Help setting up web app connection pooling using Jakarta's DBCP
1 Duke Stars available
This topic has 2 replies on 1 page.

Posts:365
Registered: 5/21/02
Help setting up web app connection pooling using Jakarta's DBCP  
Aug 3, 2004 7:45 AM



 
I have downloaded Jakarta's DBCP jar files and looked at their examples. I got a neat little example up and running that works quite nicely. I now want to integrate this connection pooling into my web-application.

Problem is that I have read somewhere that static variables are not good in web applications. So it would not be a good idea to have a static PoolingDriver (like I do in my example). I was told to use JNDI instead. Is there a way to integrate DBCP into a web-app without using JNDI?

Thanks for any and all suggestions!
 

Posts:365
Registered: 5/21/02
Re: Help setting up web app connection pooling using Jakarta's DBCP  
Aug 3, 2004 8:34 AM (reply 1 of 2)



 
 

Posts:1,160
Registered: 7/24/97
Re: Help setting up web app connection pooling using Jakarta's DBCP  
Aug 3, 2004 8:40 AM (reply 2 of 2)



 
Most Application Servers offer the ability to setup pooled JDBC Connections which you can access using JNDI.
The setup is done via your web.xml file or you can setup JDBC Connections via the admin interface of the App Server. This works in Tomcat (which uses DBCP).
 
This topic has 2 replies on 1 page.