| java.lang.Object org.apache.commons.dbcp.cpdsadapter.PooledConnectionImpl
PooledConnectionImpl | class PooledConnectionImpl implements PooledConnection,KeyedPoolableObjectFactory(Code) | | Implementation of PooledConnection that is returned by
PooledConnectionDataSource.
author: John D. McNally version: $Revision: 479137 $ $Date: 2006-11-25 08:51:48 -0700 (Sat, 25 Nov 2006) $ |
Inner Class :class PStmtKey | |
Field Summary | |
boolean | isClosed flag set to true, once close() is called. | protected KeyedObjectPool | pstmtPool My pool of {*link PreparedStatement}s. |
isClosed | boolean isClosed(Code) | | flag set to true, once close() is called.
|
pstmtPool | protected KeyedObjectPool pstmtPool(Code) | | My pool of {*link PreparedStatement}s.
|
PooledConnectionImpl | PooledConnectionImpl(Connection connection, KeyedObjectPool pool)(Code) | | Wrap the real connection.
|
activateObject | public void activateObject(Object key, Object obj) throws Exception(Code) | | My {*link KeyedPoolableObjectFactory} method for activating
{*link PreparedStatement}s.
Parameters: key - ignored Parameters: obj - ignored |
close | public void close() throws SQLException(Code) | | Closes the physical connection and marks this
PooledConnection so that it may not be used
to generate any more logical Connection s.
exception: SQLException - if an error occurs |
createKey | protected Object createKey(String sql, int resultSetType, int resultSetConcurrency)(Code) | | Create a {*link PooledConnectionImpl.PStmtKey} for the given arguments.
|
createKey | protected Object createKey(String sql)(Code) | | Create a {*link PooledConnectionImpl.PStmtKey} for the given arguments.
|
destroyObject | public void destroyObject(Object key, Object obj) throws Exception(Code) | | My {*link KeyedPoolableObjectFactory} method for destroying
{*link PreparedStatement}s.
Parameters: key - ignored Parameters: obj - the {*link PreparedStatement} to be destroyed. |
finalize | protected void finalize() throws Throwable(Code) | | Closes the physical connection and checks that the logical connection
was closed as well.
|
makeObject | public Object makeObject(Object obj) throws Exception(Code) | | My {*link KeyedPoolableObjectFactory} method for creating
{*link PreparedStatement}s.
Parameters: obj - the key for the {*link PreparedStatement} to be created |
normalizeSQL | protected String normalizeSQL(String sql)(Code) | | Normalize the given SQL statement, producing a
cannonical form that is semantically equivalent to the original.
|
notifyListeners | void notifyListeners()(Code) | | sends a connectionClosed event.
|
passivateObject | public void passivateObject(Object key, Object obj) throws Exception(Code) | | My {*link KeyedPoolableObjectFactory} method for passivating
{*link PreparedStatement}s. Currently invokes {*link PreparedStatement#clearParameters}.
Parameters: key - ignored Parameters: obj - a {*link PreparedStatement} |
prepareStatement | PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException(Code) | | Create or obtain a {*link PreparedStatement} from my pool.
a {*link PoolablePreparedStatement} |
validateObject | public boolean validateObject(Object key, Object obj)(Code) | | My {*link KeyedPoolableObjectFactory} method for validating
{*link PreparedStatement}s.
Parameters: key - ignored Parameters: obj - ignored true |
|
|