This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes package for connection pooling?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "package for connection pooling??" Watch "package for connection pooling??" New topic
Author

package for connection pooling??

mihir maniar
Ranch Hand

Joined: Sep 09, 2003
Posts: 88
please let me know what sort of interfaces or classes to use for connection pooling
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15964
    
  19

In modern-day appservers, the connection pooling is done by the J2EE container, which constructs a javax.sql.DataSource, from which you get your connection (which MUST be closed after use). You use JNDI to locate the datasource object.

The exact setup varies, so you'll have to read your appserver's documentation.

A Connection obtained via a datasource from a pool behaves exactly like any other Connection except that if you don't close it, it won't get returned to the connection pool.
[ October 21, 2004: Message edited by: Tim Holloway ]

Customer surveys are for companies who didn't pay proper attention to begin with.
 
 
subject: package for connection pooling??
 
Similar Threads
Connection Pooling
Questions on EJB
pooling in tomcat 6.x
servlet destroy method and session
Driver Loading