• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package for connection pooling??

 
mihir maniar
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please let me know what sort of interfaces or classes to use for connection pooling
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic