|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface models a pool of database Connection instances. A pool is a set of reusable instances, possibly with a limited number of instances.
| Method Summary | |
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. |
void |
setAutoCommit(boolean autoCommit)
This method enables to change the commit policy of the ConnectionPool. |
void |
setMaximumSize(int maxSize)
This method enables to change the maximum size of the ConnectionPool. |
void |
setMinimumSize(int minSize)
This method enables to change the minimum size of the ConnectionPool. |
void |
setTransactionIsolation(IsolationLevel isolationLevel)
This method enables to change the isolation level used in the ConnectionPool. |
| Method Detail |
public java.sql.Connection getConnection()
throws java.sql.SQLException
java.sql.SQLException - if a problem occurs while trying to get a Connection.
public java.sql.Connection getConnection(int waitingPeriod)
throws java.sql.SQLException
waitingPeriod - 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
conn - 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
java.sql.SQLException - if an error occurs while closing the pool.
public void setTransactionIsolation(IsolationLevel isolationLevel)
throws java.sql.SQLException
isolationLevel - the new isolation level to apply.
java.sql.SQLException - if a problem occurs while changing the isolation level.
public void setMinimumSize(int minSize)
throws java.sql.SQLException
minSize - the new minimum size to apply.
java.sql.SQLException - if a problem occurs while changing the pool minimum size.
public void setMaximumSize(int maxSize)
throws java.sql.SQLException
maxSize - the new maximum size to apply.
java.sql.SQLException - if a problem occurs while changing the pool maximum size.
public void setAutoCommit(boolean autoCommit)
throws java.sql.SQLException
autoCommit - the new commit policy to apply.
java.sql.SQLException - if a problem occurs while changing the commit policy.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||