org.apache.geronimo.connector.outbound
Class ConnectionTrackingInterceptor
java.lang.Object
org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor
- All Implemented Interfaces:
- ConnectionInterceptor
- public class ConnectionTrackingInterceptor
- extends Object
- implements ConnectionInterceptor
ConnectionTrackingInterceptor.java handles communication with the
CachedConnectionManager. On method call entry, cached handles are
checked for the correct Subject. On method call exit, cached
handles are disassociated if possible. On getting or releasing
a connection the CachedConnectionManager is notified.
- Version:
- $Rev: 355877 $ $Date: 2005-12-11 03:48:27 +0100 (Sun, 11 Dec 2005) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionTrackingInterceptor
public ConnectionTrackingInterceptor(ConnectionInterceptor next,
String key,
ConnectionTracker connectionTracker)
getConnection
public void getConnection(ConnectionInfo connectionInfo)
throws javax.resource.ResourceException
- called by: GenericConnectionManager.allocateConnection, GenericConnectionManager.associateConnection, and enter.
in: connectionInfo is non-null, and has non-null ManagedConnectionInfo with non-null managedConnectionfactory.
connection handle may or may not be null.
out: connectionInfo has non-null connection handle, non null ManagedConnectionInfo with non-null ManagedConnection and GeronimoConnectionEventListener.
connection tracker has been notified of handle-managed connection association.
- Specified by:
getConnection
in interface ConnectionInterceptor
- Parameters:
connectionInfo
-
- Throws:
javax.resource.ResourceException
returnConnection
public void returnConnection(ConnectionInfo connectionInfo,
ConnectionReturnAction connectionReturnAction)
- called by: GeronimoConnectionEventListener.connectionClosed, GeronimoConnectionEventListener.connectionErrorOccurred, exit
in: handle has already been dissociated from ManagedConnection. connectionInfo not null, has non-null ManagedConnectionInfo, ManagedConnectionInfo has non-null ManagedConnection
handle can be null if called from error in ManagedConnection in pool.
out: connectionTracker has been notified, ManagedConnectionInfo null.
- Specified by:
returnConnection
in interface ConnectionInterceptor
- Parameters:
connectionInfo
- connectionReturnAction
-
destroy
public void destroy()
- Specified by:
destroy
in interface ConnectionInterceptor
enter
public void enter(Collection connectionInfos)
throws javax.resource.ResourceException
- Throws:
javax.resource.ResourceException
exit
public void exit(Collection connectionInfos)
throws javax.resource.ResourceException
- Throws:
javax.resource.ResourceException
Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.