CICS® Transaction Gateway Programming Reference v1.1.0.0

com.ibm.connector2.cics
Class CICSConnection

java.lang.Object
  extended by com.ibm.connector2.cics.CICSConnection
All Implemented Interfaces:
javax.resource.cci.Connection
Direct Known Subclasses:
ECIConnection, EPIConnection

public abstract class CICSConnection
extends java.lang.Object
implements javax.resource.cci.Connection

This abstract class provides the general CICS connection class. It provides support for the connection metadata and the log writer.

It also supports maintaining the managed connection reference as well as the closed flag. All properties support getters and setters. Some of the properties are allowed direct access for subclasses in the package if the getters/setters are of a "simple" type. This is done for performance reasons.


Method Summary
 void close()
          Closes this connection if it is not already closed.
 javax.resource.cci.ConnectionMetaData getMetaData()
          Returns the metadata for this connection.
 javax.resource.cci.ResultSetInfo getResultSetInfo()
          Returns the resultSetInfo object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.resource.cci.Connection
createInteraction, getLocalTransaction
 

Method Detail

getResultSetInfo

public javax.resource.cci.ResultSetInfo getResultSetInfo()
                                                  throws javax.resource.ResourceException
Returns the resultSetInfo object. Not supported by CICS Resource Adapters so will always result in a throw.

Specified by:
getResultSetInfo in interface javax.resource.cci.Connection
Returns:
ResultSetInfo.
Throws:
javax.resource.NotSupportedException - If feature not supported.
javax.resource.ResourceException

getMetaData

public javax.resource.cci.ConnectionMetaData getMetaData()
                                                  throws javax.resource.ResourceException
Returns the metadata for this connection.

Specified by:
getMetaData in interface javax.resource.cci.Connection
Returns:
ConnectionMetaData.
Throws:
javax.resource.ResourceException

close

public void close()
           throws javax.resource.ResourceException
Closes this connection if it is not already closed. Any subclass that overrides this method must call the method on the superclass. The Managed Connection is asked to remove this connection and an event is fired to say the connection is closed. The connection is flagged as being in the closed state and cannot be used anymore

Attempting to close an already closed connection results in a ResourceException being thrown.

Any method providing a subclass close now cannot throw explicit exceptions. I may provide this facility under a different method name and the subclass will inherit and invoke this method rather than super().close();

Specified by:
close in interface javax.resource.cci.Connection
Throws:
javax.resource.ResourceException - If the connection is already closed.

©Copyright IBM Corp. 1994, 2014
Legal