wood burning stoves*
The moose likes JDBC and the fly likes Connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection" Watch "Connection" New topic
Author

Connection

Jun Hong
Ranch Hand

Joined: Sep 05, 2001
Posts: 181
Hi there,
Can I cache a Connection object on client side. Will this affect the performance of database. Say the database allows 25 connections and if I cache one only 19 connections are left.
Jun Hong


Jun Hong<br />SCJP, SCJD, SCWCD, SCEA<br />IBM Certified Systems Expert(V4.0)
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Caching of database Connections is normally handled via a central Conection Pooling mechanism. The pool opens all the required connections and you request connections from the pool and not directly from the database.
I hope I understood your question correctly. This assumes that the application is acting as a client to a database server, and the application itself may be a server to the next tier.
Dave
Stanley Tan
Ranch Hand

Joined: May 17, 2001
Posts: 243
Yeah, look into connection pooling which should be handled seamlessly by the container (for example, Resin). If you have any specific questions, you can post them here!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection
 
Similar Threads
JSF Database Access
ojdbc14.jar connection pool cache issue
Does jboss support pool of preparedstatement?
Does ojdbc14.jar compatible with oracle9i
Query regarditng Connection Pooling