|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--connectionpool.ConnectionPool
This class implements the Pool interface and thus is responsible for managing a single pool of connections.
| Method Summary | |
void |
addConnectionLeakListener(ConnectionLeakListener cle)
This method adds a connection leak listener. |
protected void |
finalize()
|
ConfigMonitor |
getConfigMonitor()
This method returns an instance of ConfigMonitor. |
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, i.e it actully closes them. |
void |
removeConnectionLeakListener(ConnectionLeakListener cle)
This method removes a connection leak listener. |
void |
returnConnection(java.sql.Connection ret)
This method releases the connection back to the pool. |
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Method Detail |
public java.util.Vector getConnectionsInUse()
public java.util.Vector getConnectionLeakListeners()
public int getNoOfFreeConnections()
public ConfigMonitor getConfigMonitor()
public int getCurrentPoolSize()
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 void returnConnection(java.sql.Connection ret)
ret - connection to be released
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()
protected void finalize()
throws java.lang.Throwable
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||