aspose file tools*
The moose likes JDBC and the fly likes need help on Connection Pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "need help on Connection Pooling " Watch "need help on Connection Pooling " New topic
Author

need help on Connection Pooling

Mayilsamy Annamalai
Ranch Hand

Joined: Sep 18, 2010
Posts: 35

Hi,

I'm developing a simple application. I'll like to implement the connection pooling in my application. When i searched the net i can able to see lot of examples but at end of the session i'm not able to understand even a single method.. Could any please explain me which is best and we can go for it..
Mayilsamy Annamalai
Ranch Hand

Joined: Sep 18, 2010
Posts: 35

Is any body can help out??
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30762
    
156

Which connection pooling library were you looking at? Typically there is only one method - getConnection() if that. Most of the time there is just a connection pool driver. You say how many connections you want and everything happens behind the scenes.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19720
    
  20

Mayilsamy Annamalai wrote:Is any body can help out??

PatienceIsAVirtue.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Brian Enochson
Greenhorn

Joined: Apr 12, 2011
Posts: 14

A common free one used in the Java world is Apache Database Connection Pool (DBCP). http://commons.apache.org/dbcp. This is specifically for pooling of data sources and builds on the common pool library which provides generic object pooling functionality.

DBCP has a couple of versions, 1.4 is for Java 6 and 1.3 for Java 5 and earlier. It comes with a good set of examples and there is plenty of reference material on the web.

As to your post, were you looking for a recommendation then I can say I have used this before. If you need examples of how to use it, I would look first in the examples.

Brian
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: need help on Connection Pooling