• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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 ]
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic