This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JDBC and the fly likes Connection pools Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection pools" Watch "Connection pools" New topic
Author

Connection pools

alain martin
Ranch Hand

Joined: Apr 11, 2005
Posts: 43
I'm developing a web service application. I want use a pool connection. I searched in google and I found it can be done with tomcat, jdbcconnection poool and jndi.

I don't know the advantages and incenvenients of them. �which do you recomend me?
Thanks


<a href="http://www.hhdirecto.net" target="_blank" rel="nofollow">http://www.hhdirecto.net</a>
Praveen Babu
Ranch Hand

Joined: Jul 30, 2006
Posts: 138
Hi,

Follow the link for some good connection pools.

http://java-source.net/open-source/connection-pools

The only difference between them are that they are from different vendors and also the performance. If you want the one with better performance, you still need to google.

Hope this helps you a little.

Bye & Regards,
Praveen
alain martin
Ranch Hand

Joined: Apr 11, 2005
Posts: 43
thank you, its a good link.

�Whitch have the best performance?
Masoud Kalali
Author
Ranch Hand

Joined: Jul 08, 2004
Posts: 531

to have a connection pool you have at least two options:

-use a library that create the pool (you create it in your application and your application manage the pool) and use this pool to retrieve the connections.
-use applications server to create and manage the pool.

in first solution you download the library and use it to create a pool according to its manual, apache DBCP is a good option.
and here is a link to almost all open source connection pooling library that you can use for your connection pooling .
http://java-source.net/open-source/connection-pools

in the second solution you build the connection pool/datasource in application server admin console (web / command line /swing ) and then you can access to that data source using JNDI .you can also configure the pool in the context file for tomcat.
here is the reference : http://tomcat.apache.org/tomcat-4.1-doc/jndi-datasource-examples-howto.html

using connection pool ,in brief, improve the performance by reusing the connections instead of creating connections each time that you need a connection.


Masoud Kalali
Software Engineer - My Weblog - GlassFish Security
 
GeeCON Prague 2014
 
subject: Connection pools