|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.jdbc.ConnectionPool
Provides a ConnectionPool that can be used by multiple data sources to get connections to a single database.
This class should not be subclassed.
Constructor Summary | |
ConnectionPool(javax.sql.ConnectionPoolDataSource cpDataSource)
Creates a new Connection Pool using a ConnectionPoolDataSource. |
Method Summary | |
void |
close()
Closes all the PooledConnections in the the ConnectionPool. |
java.sql.Connection |
getConnection()
Gets a Connection from the Connection Pool. |
boolean |
isClosed()
Checks whether the ConnectionPool has been closed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConnectionPool(javax.sql.ConnectionPoolDataSource cpDataSource)
This constructor will also spawn a thread for cleaning the connection pool every 30 seconds.
cpDataSource
- The Connection Pool Data Source to get PooledConnections from.Method Detail |
public java.sql.Connection getConnection() throws java.sql.SQLException
If no available connections exist a new connection will be created and added to the pool. When the returned connection is closed it will be added to the connection pool for other requests to this method.
java.sql.SQLException
- If an error occurs getting the connection or if the
connection pool has been closed by a previous call to close().public void close()
public boolean isClosed()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |