Package com.ibm.jakarta.connector2.cics
Class ECIManagedConnection
java.lang.Object
com.ibm.jakarta.connector2.cics.CICSManagedConnection
com.ibm.jakarta.connector2.cics.ECIManagedConnection
- All Implemented Interfaces:
jakarta.resource.spi.DissociatableManagedConnection
,jakarta.resource.spi.LazyEnlistableManagedConnection
,jakarta.resource.spi.ManagedConnection
public final class ECIManagedConnection
extends CICSManagedConnection
implements jakarta.resource.spi.DissociatableManagedConnection, jakarta.resource.spi.LazyEnlistableManagedConnection
ECIManagedConnection is class that interfaces directly with the CICS EIS. All execute() requests on ECIInteractions go through the respective ECIManagedConnection
In a managed environment the system will also interface with the ECIManagedConnection to control Transactions within the ECI Connector.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
associateConnection
(Object conn) This function allows an ECIConnection object to be associated with this ManagedConnection.void
cleanup()
Clean-up method.void
destroy()
Destructor.void
Dissociates all the ECI Connections from this managed connection instance.getConnection
(Subject security, jakarta.resource.spi.ConnectionRequestInfo request) The custom connection mechanism.jakarta.resource.spi.LocalTransaction
SPI version of Local Transaction interface returns an SPILocalTransaction object for use by the J2EE environment.jakarta.resource.spi.ManagedConnectionMetaData
returns a ManagedConnection MetaData Object for this resource adapter.Accessor for this ECIManagedConnections XA Resource interface object.void
boolean
Gets the status of the connection to CICS when configured to use a local mode IPIC connection.toString()
toString() method for use in tracingMethods inherited from class com.ibm.jakarta.connector2.cics.CICSManagedConnection
addConnectionEventListener, getLogWriter, removeConnectionEventListener, setLogWriter
-
Field Details
-
CLASS_VERSION
- See Also:
-
EIS_PRODUCT_NAME
- See Also:
-
-
Method Details
-
associateConnection
This function allows an ECIConnection object to be associated with this ManagedConnection. Upon association the new ECIConnection will become the current active Connection. Association with a new ECIManagedConnecion causes the ECIConnection to be dis-associated from its current ECIManagedConnection.- Specified by:
associateConnection
in interfacejakarta.resource.spi.ManagedConnection
- Overrides:
associateConnection
in classCICSManagedConnection
- Parameters:
conn
- The ECIConnection to be associated with this ECIManagedConnection.- Throws:
jakarta.resource.ResourceException
- Thrown if an error occurs in the association or if conn is not of the correct type or null.
-
cleanup
public void cleanup() throws jakarta.resource.ResourceExceptionClean-up method. This method prepares the ECIManagedConnection for re-use by the environment.- Specified by:
cleanup
in interfacejakarta.resource.spi.ManagedConnection
- Overrides:
cleanup
in classCICSManagedConnection
- Throws:
jakarta.resource.ResourceException
- Thrown if cleanup does not complete successfully
-
destroy
public void destroy() throws jakarta.resource.ResourceExceptionDestructor. This method destroys any resources being used by the ECIManagedConnection and disables any further interaction with it.- Specified by:
destroy
in interfacejakarta.resource.spi.ManagedConnection
- Overrides:
destroy
in classCICSManagedConnection
- Throws:
jakarta.resource.ResourceException
- Thrown if destruction does not complete successfully
-
toString
toString() method for use in tracing- Overrides:
toString
in classCICSManagedConnection
- Returns:
- A String representation
-
getConnection
public Object getConnection(Subject security, jakarta.resource.spi.ConnectionRequestInfo request) throws jakarta.resource.ResourceException The custom connection mechanism. This method provides an ECIConnection object that uses additional properties supplied in the parameters to re-authenticate the connection to CICS. Re-authentication only takes place when this is the first getConnection() call after the MC has been created or requested from the pool.- Specified by:
getConnection
in interfacejakarta.resource.spi.ManagedConnection
- Parameters:
security
- A Subject object containing a PasswordCredential to be used as the security credentials by the Connection.request
- An ECIConnectionRequestInfo object containing a set of credentials to be used for the Connection.- Returns:
- An ECIConnection handle for this ECIManagedConnection
- Throws:
jakarta.resource.ResourceException
- Thrown if the connection request fails.
-
getLocalTransaction
public jakarta.resource.spi.LocalTransaction getLocalTransaction() throws jakarta.resource.ResourceExceptionSPI version of Local Transaction interface returns an SPILocalTransaction object for use by the J2EE environment.- Specified by:
getLocalTransaction
in interfacejakarta.resource.spi.ManagedConnection
- Returns:
- The SPI Local Transaction object for this ECIManagedConnection
- Throws:
jakarta.resource.ResourceException
-
getXAResource
Accessor for this ECIManagedConnections XA Resource interface object. Using the returned XAResource, transactions on the ECIManagedConnection can be controlled.- Specified by:
getXAResource
in interfacejakarta.resource.spi.ManagedConnection
- Returns:
- The XAResource handle for this ECIManagedConnection
- Throws:
jakarta.resource.ResourceException
-
getMetaData
public jakarta.resource.spi.ManagedConnectionMetaData getMetaData()returns a ManagedConnection MetaData Object for this resource adapter.- Specified by:
getMetaData
in interfacejakarta.resource.spi.ManagedConnection
- Overrides:
getMetaData
in classCICSManagedConnection
- Returns:
- ManagedConnectionMetaData
-
dissociateConnections
public void dissociateConnections() throws jakarta.resource.ResourceExceptionDissociates all the ECI Connections from this managed connection instance. This allows the application server to associate the managed connection with another ECI Connection via lazy connection association.- Specified by:
dissociateConnections
in interfacejakarta.resource.spi.DissociatableManagedConnection
- Throws:
jakarta.resource.ResourceException
- If any connection instance isn't an instance of ECIConnection
-
setAuth
-
testConnection
public boolean testConnection() throws jakarta.resource.NotSupportedExceptionGets the status of the connection to CICS when configured to use a local mode IPIC connection. This method can be used to determine whether a subsquent interaction on this connection is likely to succeed. If this connection does not use a local mode IPIC connection to CICS, or the IPIC connection status cannot reliably be determined, aNotSupportedException
is thrown. This method is only called when resource adapter is deployed in Traditional WAS.- Returns:
- true if the IPIC connection to CICS is available; false if the connection is not available
- Throws:
jakarta.resource.NotSupportedException
- if this connection does not use a local mode IPIC connection or the connection status cannot reliably be determined
-