public class DisposableConnectionFacade extends JdbcInterceptor
PooledConnection. The ProxyCutOffConnection intercepts two methods:
Connection.close() - returns the connection to the pool then breaks the link between cutoff and the next interceptor. May be called multiple times.Object.toString() - returns a custom string for this objectPoolConfiguration.setUseEquals(boolean) has been called
with a true argument.CLOSE_VAL, GETCONNECTION_VAL, ISCLOSED_VAL, ISVALID_VAL, ISWRAPPERFOR_VAL, properties, TOSTRING_VAL, UNWRAP_VAL| Modifier | Constructor and Description |
|---|---|
protected |
DisposableConnectionFacade(JdbcInterceptor interceptor) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Gets invoked each time an operation on
Connection is invoked. |
void |
reset(ConnectionPool parent,
PooledConnection con)
Gets called each time the connection is borrowed from the pool
This means that if an interceptor holds a reference to the connection
the interceptor can be reused for another connection.
|
compare, compare, disconnected, getNext, getProperties, isUseEquals, poolClosed, poolStarted, setNext, setProperties, setUseEqualsprotected DisposableConnectionFacade(JdbcInterceptor interceptor) throws java.sql.SQLException
java.sql.SQLExceptionpublic void reset(ConnectionPool parent, PooledConnection con)
JdbcInterceptorreset in class JdbcInterceptorparent - - the connection pool owning the connectioncon - - the pooled connectionpublic java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
JdbcInterceptorConnection is invoked.
invoke in interface java.lang.reflect.InvocationHandlerinvoke in class JdbcInterceptorjava.lang.ThrowableCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.