aspose file tools*
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
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!
 
jQuery in Action, 2nd edition
 
subject: Connection