com.stc.connector.framework.eway
Interface EwayConnection


public interface EwayConnection

EwayConnection interface for ManagedConnection support

Version:
$Version$
Author:
$Author: kgambrel $

Method Summary
 void cleanup()
          Perform clean up of any resources or reset of any state held by the instance of EwayConnection.
 void destroy()
          Release any resources prior to the destruction of the associated ManagedConnection.
 AssociateableHandle getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
          Get a new instance of the connection handle (application connection).
 javax.resource.spi.LocalTransaction getLocalTransaction()
          Get a LocalTransaction instance for local transaction demaracation.
 javax.resource.spi.ManagedConnectionMetaData getMetaData()
          Get a new instance of the ManagedConnectionMetaData which contains connection information for the currently established connection.
 javax.transaction.xa.XAResource getXAResource()
          Get an XAResource instance for global transaction demaracation.
 void initialize(ManagedConnectionCallback mcCallback, javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
          Initialize the EwayConnection.
 boolean matchConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
          Determines whether this instance of the EwayConnection matches the the connection request with the connection information in Subject and/or ConnectionRequestInfo.
 

Method Detail

initialize

public void initialize(ManagedConnectionCallback mcCallback,
                       javax.security.auth.Subject subject,
                       javax.resource.spi.ConnectionRequestInfo cri)
                throws javax.resource.ResourceException
Initialize the EwayConnection. Establish the connection to the external system (EIS).

Parameters:
mcCallback - The callback object for getting services from the associated ManagedConnection.
subject - The Subject instance which holds the credentials for EIS signon.
cri - The ConnectionRequestInfo instance which can hold both EIS signon information or general connection specific information. The ConnectionRequestInfo provided will contain the union of the properties from the client connection request properties, the ResourceAdapter properties, and the ManagedConnectionFactory properties.
Throws:
javax.resource.ResourceException - upon error.

cleanup

public void cleanup()
             throws javax.resource.ResourceException
Perform clean up of any resources or reset of any state held by the instance of EwayConnection.

Throws:
javax.resource.ResourceException - upon error.

destroy

public void destroy()
             throws javax.resource.ResourceException
Release any resources prior to the destruction of the associated ManagedConnection.

Throws:
javax.resource.ResourceException - upon error.

getConnection

public AssociateableHandle getConnection(javax.security.auth.Subject subject,
                                         javax.resource.spi.ConnectionRequestInfo cri)
                                  throws javax.resource.ResourceException
Get a new instance of the connection handle (application connection). If the Subject and/or ConnectionRequestInfo contains different connection establishment information, then the Eway should reauthenticate with the EIS.

Parameters:
subject - The Subject instance which holds the credentials for EIS signon.
cri - The ConnectionRequestInfo instance which holds both EIS EIS signon information or general connection specific information. The ConnectionRequestInfo provided will contain the union of the properties from the client connection request properties, the ResourceAdapter properties, and the ManagedConnectionFactory properties.
Returns:
A connection handle (application connection) instance which implements the Associateable interface.
Throws:
javax.resource.ResourceException - upon error.

matchConnection

public boolean matchConnection(javax.security.auth.Subject subject,
                               javax.resource.spi.ConnectionRequestInfo cri)
Determines whether this instance of the EwayConnection matches the the connection request with the connection information in Subject and/or ConnectionRequestInfo.

Parameters:
subject - The Subject instance which holds the credentials for EIS signon.
cri - The ConnectionRequestInfo instance which holds both EIS EIS signon information or general connection specific information. The ConnectionRequestInfo provided will contain the union of the properties from the client connection request properties, the ResourceAdapter properties, and the ManagedConnectionFactory properties.
Returns:
A boolean true if there is a connection match; false otherwise.

getLocalTransaction

public javax.resource.spi.LocalTransaction getLocalTransaction()
                                                        throws javax.resource.ResourceException
Get a LocalTransaction instance for local transaction demaracation.

Returns:
A LocalTransaction instance.
Throws:
javax.resource.ResourceException - upon error.

getMetaData

public javax.resource.spi.ManagedConnectionMetaData getMetaData()
                                                         throws javax.resource.ResourceException
Get a new instance of the ManagedConnectionMetaData which contains connection information for the currently established connection.

Returns:
An instance of ManagedConnectionMetaData which contains information about the current established connection to the EIS.
Throws:
javax.resource.ResourceException - upon error.

getXAResource

public javax.transaction.xa.XAResource getXAResource()
                                              throws javax.resource.ResourceException
Get an XAResource instance for global transaction demaracation.

Returns:
A XAResource instance.
Throws:
javax.resource.ResourceException - upon error.