com.ibm.websphere.j2c
Interface ConnectionManager

All Superinterfaces:
javax.resource.spi.ConnectionManager, java.io.Serializable

public interface ConnectionManager
extends javax.resource.spi.ConnectionManager

This ConnectionManager interface provides support for inactive connection handles ("Smart Handles"). SmartHandles reduce the overhead incurred when the Application Server manages the Connection Handles, by allowing the ResourceAdapter to determine when a ConnectionHandle should be associated with a ManagedConnection. The ResourceAdapter will have to manage the state of the Connection (active or inactive).

See Also:

Field Summary
static long serialVersionUID
           
 
Method Summary
 void associateConnection(javax.resource.spi.ManagedConnectionFactory mcf, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri, java.lang.Object connection)
          AssociateConnection should be called by the ResourceAdapter before any work is done on an inactive Connection.
 void inactiveConnectionClosed(java.lang.Object connection)
          InactiveConnectionClosed is called by the ResourceAdapter when an inactiveConnection is closed, this is necessary because no ManagedConnection instance is associated with an inactive handle, so you cannot call the ConnectionClosed event on the associated ConnectionEventListener.
 
Methods inherited from interface javax.resource.spi.ConnectionManager
allocateConnection
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Method Detail

associateConnection

public void associateConnection(javax.resource.spi.ManagedConnectionFactory mcf,
                                javax.security.auth.Subject subject,
                                javax.resource.spi.ConnectionRequestInfo cri,
                                java.lang.Object connection)
                         throws javax.resource.ResourceException
AssociateConnection should be called by the ResourceAdapter before any work is done on an inactive Connection.
Parameters:
mcf - The ManagedConnectionFactory that may be used to create a new ManagedConnection (usually one will be found in the pool.
subject - The subject for this connection.
cri - The connection request specific info (this may include userId & password).
connection - The connection handle that should be associated with a valid ManagedConnection.

inactiveConnectionClosed

public void inactiveConnectionClosed(java.lang.Object connection)
InactiveConnectionClosed is called by the ResourceAdapter when an inactiveConnection is closed, this is necessary because no ManagedConnection instance is associated with an inactive handle, so you cannot call the ConnectionClosed event on the associated ConnectionEventListener.
Parameters:
connection - The connection handle that was closed.