Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JDBC Connection Pooling issue

 
Prabhudatta Choudhury
Greenhorn
Posts: 20
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a connection pooling class where I have all the necessary getconnection and releaseconnection Methods. I'm trying to reuse the same connection object in through out my project. So, I created an instance variable of the Connection in the inherited class and used that in all the methods in that calss. But when I tried to run the same in Tomcat 6 its throwing some error regarding release connection.





ConnectionPoolCustom2.java


 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for trying but our tags here inthe ranch use [ ] brackets not < >, so I have fixed them for you
 
Prabaharan Gopalan
Ranch Hand
Posts: 66
Java Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly is the error you're getting? Were you able to execute statements through the connection acquired from the pool?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!