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

How to Use Connection Pooling

 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to JDBC. I know how to use DataSource to get connection and use prepareStatement to execute SQL against Oracle 9i. But everytime it takes a long time to establish the connection to Oracle. I heard of connection pooling can solve the long connection delay problem. But how do I get start using it? Am I required to buy/install special connection pooling facilities in order to use it?

Thx for any advice
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35976
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alec,
You don't need to buy anything. If you are using an application server like Tomcat or JBoss, it comes with the server. If not, take a look at the Jakarta Commons project for a connection pool implementation.
 
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!