|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
This interface defines the behavior of the class that will manage the connections i.e a single pool of connections.
| Method Summary | |
void |
addConnectionLeakListener(ConnectionLeakListener cle)
This method adds a connection leak listener. |
java.sql.Connection |
getConnection()
This method returns a Connection from the connection pool. |
java.sql.Connection |
getConnection(java.lang.String owner)
This method returns a Connection from the pool. |
java.util.Vector |
getConnectionLeakListeners()
|
java.util.Vector |
getConnectionsInUse()
|
int |
getCurrentPoolSize()
This method returns the current size of the pool. |
int |
getNoOfFreeConnections()
|
void |
releaseConnections()
This method releases excessive connections. |
void |
removeConnectionLeakListener(ConnectionLeakListener cle)
This method removes a connection leak listener. cle will
not get any further notifications. |
void |
returnConnection(java.sql.Connection conn)
This method releases the Connection conn to the pool. |
| Method Detail |
public java.sql.Connection getConnection()
throws ConnectionPoolException
public java.sql.Connection getConnection(java.lang.String owner)
throws ConnectionPoolException
owner .
Note: This method blocks if the pool size has reached it's
maximum size and no free connections are available
until a free connection is available. The time period for which this
method blocks depends on the connection-wait-time-out specified in
the configuration file.owner - String identifying the owner.public int getCurrentPoolSize()
public void returnConnection(java.sql.Connection conn)
conn to the pool.public java.util.Vector getConnectionsInUse()
public java.util.Vector getConnectionLeakListeners()
public int getNoOfFreeConnections()
public void addConnectionLeakListener(ConnectionLeakListener cle)
throws ConnectionPoolException
cle will be called when a leak is detected as per the
pool configuration.cle - Class implementing ConnectionLeakListener interface.
public void removeConnectionLeakListener(ConnectionLeakListener cle)
throws ConnectionPoolException
cle will
not get any further notifications.cle - Class implementing ConnectionLeakListener interface.public void releaseConnections()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||