• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Looking For Connection Bean For Connection Pool

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic