This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
ojdbc14.jar connection pool cache issue
JSF Database Access
Does jboss support pool of preparedstatement?
Query regarditng Connection Pooling
Does ojdbc14.jar compatible with oracle9i