org.apache.geronimo.connector.outbound
Class ConnectionTrackingInterceptor

java.lang.Object
  extended byorg.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:
$Revision: 1.10 $ $Date: 2004/05/30 19:03:36 $

Constructor Summary
ConnectionTrackingInterceptor(ConnectionInterceptor next, String key, ConnectionTracker connectionTracker)
           
 
Method Summary
 void enter(Collection connectionInfos)
           
 void exit(Collection connectionInfos)
           
 void getConnection(ConnectionInfo connectionInfo)
          called by: GenericConnectionManager.allocateConnection, GenericConnectionManager.associateConnection, and enter.
 void returnConnection(ConnectionInfo connectionInfo, ConnectionReturnAction connectionReturnAction)
          called by: GeronimoConnectionEventListener.connectionClosed, GeronimoConnectionEventListener.connectionErrorOccurred, exit in: handle has already been dissociated from ManagedConnection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionTrackingInterceptor

public ConnectionTrackingInterceptor(ConnectionInterceptor next,
                                     String key,
                                     ConnectionTracker connectionTracker)
Method Detail

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 -

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-2005 Apache Software Foundation. All Rights Reserved.