• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Pooling on Tomcat

 
Siamak Saarmann
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am using direct JDBC connections in my web application. It seems to me that it opens too many connections to database and I need to do something.

Would somone please forward me to code snippet that shows how can I use Tomcat managed database connections?

Regards,
Mac
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the container-managed connection pooling should indeed solve your problem. I've moved this to the Tomcat forum where it should get better exposure to Tomcat users.
 
Craig Jackson
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The links below should get you started:

JNDI Resources HOW TO

JNDI Datasources HOW TO

Commons DBCP Overview
 
Siamak Saarmann
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Craig,

Thank you for your help.

Regards, Mac
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic