com.cafesoft.core.jdbc
Class PoolableConnection
java.lang.Object
|
+--com.cafesoft.core.jdbc.DelegatingConnection
|
+--com.cafesoft.core.jdbc.PoolableConnection
- All Implemented Interfaces:
- Connection
- public class PoolableConnection
- extends DelegatingConnection
An extended version of the DelegatingConnection class. The primary
difference is the close() method. The PoolableConnection's close
method returns the Connection object to the ConnectionPool.
- Since:
- 10/31/02
- See Also:
Connection,
DelegatingConnection
|
Method Summary |
void |
close()
Releases this Connection object's database and JDBC resources
immediately instead of waiting for them to be automatically released.
|
void |
reallyClose()
Really close the connection do not just return it to
it's object pool |
| Methods inherited from class com.cafesoft.core.jdbc.DelegatingConnection |
activate, addStatement, checkOpen, clearWarnings, commit, createStatement, createStatement, createStatement, getAutoCommit, getCatalog, getHoldability, getInfo, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, nativeSQL, passivate, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, removeStatement, rollback, rollback, setAutoCommit, setCatalog, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PoolableConnection
public PoolableConnection(Connection conn,
ConnectionPool pool)
- Create a new PoolableConnection object
- Parameters:
conn - the underlying Connection to delegate all method calls topool - the ConnectionPool the Connection returns to when closed
reallyClose
public void reallyClose()
throws SQLException
- Really close the connection do not just return it to
it's object pool
- Throws:
SQLException - thrown if an error occurs closing the Connection
close
public void close()
throws SQLException
- Releases this
Connection object's database and JDBC resources
immediately instead of waiting for them to be automatically released.
Calling the method close on a Connection
object that is already closed is a no-op.
Note: A Connection object is automatically
closed when it is garbage collected. Certain fatal errors also
close a Connection object.
- Specified by:
close in interface Connection- Overrides:
close in class DelegatingConnection
- Throws:
SQLException - if a database access error occurs
Generated on 10:40:31 AM September 10, 2003, © 1996-2003 Cafésoft LLC. All rights reserved.