Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes How do close/destroy connection pool? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How do close/destroy connection pool?" Watch "How do close/destroy connection pool?" New topic

How do close/destroy connection pool?

Ron Newman
Ranch Hand

Joined: Jun 06, 2002
Posts: 1056
If I have a connection pool registered in JNDI as a DataSource, how do I get rid of it when I no longer need it, and thereby release all of the pooled connections?
I don't see a close() or destroy() method in either the DataSource or ConnectionPoolDataSource interface.

Ron Newman - SCJP 1.2 (100%, 7 August 2002)
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
Isn't this the application server tools' responsibility (the same way as it's the appserver tools used to create/configure the DataSources)?

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Ron Newman
Ranch Hand

Joined: Jun 06, 2002
Posts: 1056
I don't know. What is an "application server tool" and how does it get invoked when a servlet context is being shut down?
I'm not using any "tools" that I know of to configure or create the data source; I'm just adding stuff to server.xml and web.xml .
[ July 24, 2003: Message edited by: Ron Newman ]
subject: How do close/destroy connection pool?
Similar Threads
Orphan Timeout & Idle Timeout in WebSphere 4.0
Connection Pooling and JSTL
A small chicken and the egg situation!
How do you close the JDBC connection back to the Connection pool?
Database Connection Pooling initialization with dbcp