wood burning stoves 2.0*
The moose likes JSP and the fly likes Looking For Connection Bean For Connection Pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Looking For Connection Bean For Connection Pool" Watch "Looking For Connection Bean For Connection Pool" New topic
Author

Looking For Connection Bean For Connection Pool

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I am looking for a connection bean that provides connection object to a database from a connection pool. I am using Tomcat. The connection pool has been configured in the $TOMCATHOME\config\server.xml file and JNDI is referenced in the web.xml file.
I know some people use http://www.bitmechanic.com/projects/jdbcpool/
and are happy with it. But, my machine cannot unzip the .tar file that is downloadable from the bitmechanic. Therefore, I am unable to go for that option.
I have come up with my own simple DBConnecion.java to pass a connection to a controller servlet (VerificationServlet.java). But, I got NullPointerException because it is a 'null' connection object. And I need help. My code is shown below:
DBConnection.java:

VerificationServlet.java:

[ July 11, 2003: Message edited by: JiaPei Jen ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Looking For Connection Bean For Connection Pool
 
Similar Threads
DataSource issues
NullPointerException At Statement stmt = conn.createStatement();
How To Access Objects Returned From A Helper/Utility Class?
Must Restart Tomcat to Aquire A Connection From The Pool
Please Help! I Have Worked On IT For Days.