|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jcreme.pool.ObjectPool
org.jcreme.sql.WrappedConnectionPool
This implementation of the ConnectionPool interface enables to pool WrappedConnection instances.
| Constructor Summary | |
WrappedConnectionPool(int minSize,
int maxSize,
java.lang.String url,
java.util.Properties properties,
IsolationLevel isolationLevel)
|
|
| Method Summary | |
protected java.lang.Object |
buildNew()
This method enabled to build a new object when needed. |
void |
close()
This method signals the pool it should close all the available connections. |
java.sql.Connection |
getConnection()
This method provides a Connection to the database from the pool. |
java.sql.Connection |
getConnection(int waitingPeriod)
This method provides a Connection to the database from the pool. |
void |
releaseConnection(java.sql.Connection conn)
This method enables to return a Connection to the pool. |
protected void |
removeOld(java.lang.Object obj)
This method enabled to remove an old object when needed. |
void |
setAutoCommit(boolean autoCommit)
This method enables to change the commit policy of the ConnectionPool. |
void |
setTransactionIsolation(IsolationLevel isolationLevel)
This method enables to change the isolation level used in the ConnectionPool. |
| Methods inherited from class org.jcreme.pool.ObjectPool |
getFreeObjects, getObject, getObject, getObjectFromFree, getObjectFromFree, getObjectFromUsed, getUsedObjects, initPool, putInFreeObjects, putInUsedObjects, releaseObject, setMaximumSize, setMinimumSize |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jcreme.sql.ConnectionPool |
setMaximumSize, setMinimumSize |
| Constructor Detail |
public WrappedConnectionPool(int minSize,
int maxSize,
java.lang.String url,
java.util.Properties properties,
IsolationLevel isolationLevel)
minSize - maxSize - url - properties - isolationLevel - | Method Detail |
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface ConnectionPooljava.sql.SQLException - if a problem occurs while trying to get a Connection.
public java.sql.Connection getConnection(int waitingPeriod)
throws java.sql.SQLException
getConnection in interface ConnectionPoolwaitingPeriod - the number of milliseconds for which the method call will be
blocked waiting for an available connection.
java.sql.SQLException - if a problem occurs while trying to get a Connection.
public void releaseConnection(java.sql.Connection conn)
throws java.sql.SQLException
releaseConnection in interface ConnectionPoolconn - the Connection to be returned.
java.sql.SQLException - if a problem occurs while trying to release a Connection.
public void close()
throws java.sql.SQLException
close in interface ConnectionPooljava.sql.SQLException - if an error occurs while closing the pool.protected final java.lang.Object buildNew()
buildNew in class ObjectPool
public void setTransactionIsolation(IsolationLevel isolationLevel)
throws java.sql.SQLException
setTransactionIsolation in interface ConnectionPoolisolationLevel - the new isolation level to apply.
java.sql.SQLException - if a problem occurs while changing the isolation level.
public void setAutoCommit(boolean autoCommit)
throws java.sql.SQLException
setAutoCommit in interface ConnectionPoolautoCommit - the new commit policy to apply.
java.sql.SQLException - if a problem occurs while changing the commit policy.protected void removeOld(java.lang.Object obj)
removeOld in class ObjectPoolobj - the object to remove.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||