Package All Classes All Fields and Methods Deprecated


com.ibm.connector2.ims.ico
Class IMSManagedConnection

java.lang.Object
  extended bycom.ibm.connector2.ims.ico.IMSManagedConnection
All Implemented Interfaces:
javax.resource.spi.DissociatableManagedConnection, com.ibm.ims.ico.IMSICOProperties, javax.resource.spi.LazyEnlistableManagedConnection, javax.resource.spi.ManagedConnection

public abstract class IMSManagedConnection
extends java.lang.Object
implements javax.resource.spi.ManagedConnection, javax.resource.spi.LazyEnlistableManagedConnection, javax.resource.spi.DissociatableManagedConnection, com.ibm.ims.ico.IMSICOProperties

An IMSManagedConnection is an abstract class for the IMS managed connection that represents a physical connection to IMS via IMS Connect. This class contains methods and properties for handling generic (non-communication-protocol specific) connection interactions with IMS Connect.

Java applications using the Common Client Interface (CCI) do not directly reference IMSManagedConnection.


Field Summary
 
Fields inherited from interface com.ibm.ims.ico.IMSICOProperties
COMMIT_THEN_SEND, DEFAULT_ALTCLIENTID_NAME, DEFAULT_CM0DEDICATED, DEFAULT_COMMIT_MODE, DEFAULT_CURRENT_SEGMENT, DEFAULT_DATASTORE_NAME, DEFAULT_ENCRYPTYPE, DEFAULT_GROUPNAME, DEFAULT_HOSTNAME, DEFAULT_IMSCONNNAME, DEFAULT_ISSSL, DEFAULT_KEYSTORENAME, DEFAULT_KEYSTOREPASSWD, DEFAULT_LTERM_NAME, DEFAULT_MAP_NAME, DEFAULT_PASSWORD, DEFAULT_PORTNUMBER, DEFAULT_REPOSITORYID, DEFAULT_REPOSITORYURI, DEFAULT_REROUTE_NAME, DEFAULT_TRUSTSTORENAME, DEFAULT_TRUSTSTOREPASSWD, DEFAULT_USERNAME, ENCRYPTYPE_0, ENCRYPTYPE_1, ENCRYPTYPE_2, IBM_SSL_CERT_TYPE, MAX_ALTCLIENTIDNAME, MAX_CIPHER_ARRAY, MAX_CLIENTID, MAX_DATASTORENAME, MAX_GROUPNAME, MAX_IMSCONNNAME, MAX_LTERMNAME, MAX_MAPNAME, MAX_PASSWORD, MAX_REROUTENAME, MAX_SSLSTOREPASSWORD, MAX_USERNAME, MODE_ACK_TEXT, MODE_COMMIT_TEXT, MODE_END_CONVERSATION_TEXT, MODE_FORGET_TEXT, MODE_NACK_TEXT, MODE_PREPARE_TEXT, MODE_RECEIVE_ASYNCOUTPUT_SINGLE_NOWAIT_TEXT, MODE_RECEIVE_ASYNCOUTPUT_SINGLE_WAIT_TEXT, MODE_RECEIVE_ASYNCOUTPUT_TEXT, MODE_RECEIVE_TEXT, MODE_RECOVER_TEXT, MODE_ROLLBACK_TEXT, MODE_SEND_ONLY_TEXT, MODE_SEND_RECEIVE_TEXT, SEND_THEN_COMMIT, SSL_PROVIDER, SSL_STORE_TYPE_JCE4758RACFKS, SSL_STORE_TYPE_JCERACFKS, SSL_STORE_TYPE_JKS, SUN_SSL_CERT_TYPE, SYNC_LEVEL_CONFIRM, SYNC_LEVEL_NONE, SYNC_LEVEL_SYNCPT
 
Method Summary
 void addConnectionEventListener(javax.resource.spi.ConnectionEventListener aListener)
          Used by the application server to register a listener interested in receiving notification of events associated with this IMSManagedConnection instance.
 void associateConnection(java.lang.Object handle)
           Associates a connection handle with an IMSManagedConnection instance.
 void cleanup()
           Called by the application server to clean up any client-specific state data maintained by an IMSManagedConnection instance and put the IMSManagedConnection instance back in the pool.
 void destroy()
          Closes the physical connection and releases all system resources held by the associated IMSManagedConnection instance.
 void dissociateConnections()
          Called by an application server that is capable of lazy connection association in order to dissociate a ManagedConnection instance from all of its connection handles.
 java.lang.Object getConnection(javax.security.auth.Subject aSubject, javax.resource.spi.ConnectionRequestInfo aConnectionRequestInfo)
           Called by the application server to create a new application-level handle to an object that represents an underlying physical connection (an IMSManagedConnection instance).
 javax.resource.spi.LocalTransaction getLocalTransaction()
          Returns a javax.resource.spi.LocalTransaction instance that enables the application server to manage local transactions for the resource manager.
 java.io.PrintWriter getLogWriter()
          Returns a reference to the logWriter to allow the client application to write messages to the trace log.
 IMSManagedConnectionFactory getMCFactory()
          Insert the method's description here.
 javax.resource.spi.ManagedConnectionMetaData getMetaData()
          Returns the IMSMangedConnectionMetaData instance which contains information about the associated IMSManagedConnection instance.
 java.lang.Integer getTraceLevel()
          Returns the value of the traceLevel property.
 javax.transaction.xa.XAResource getXAResource()
          Returns a javax.transaction.xa.XAResource instance that enables the application server to demarcate global transactions with a resource manager .
 void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener aListener)
          The application server uses the removeConnectionEventListener method to remove a connection listener from an IMSManagedConnection instance.
 void setLogWriter(java.io.PrintWriter aLogWriter)
          Sets the value of the logWriter property.
 void setTraceLevel(java.lang.Integer aTraceLevel)
          Sets the value of the traceLevel property.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addConnectionEventListener

public void addConnectionEventListener(javax.resource.spi.ConnectionEventListener aListener)
Used by the application server to register a listener interested in receiving notification of events associated with this IMSManagedConnection instance.

Specified by:
addConnectionEventListener in interface javax.resource.spi.ManagedConnection
Parameters:
aListener - An interested listener (the application server.)

associateConnection

public void associateConnection(java.lang.Object handle)
                         throws javax.resource.ResourceException

Associates a connection handle with an IMSManagedConnection instance. In the case of lazy connection association, associateConnection is invoked by the connection manager so that a connection handle can be returned to the active state.

Used by the application server to change the association of an application-level connection handle (IMSConnection object) with a ManagedConnection instance (IMSManagedConnection instance). The application server finds the right ManagedConnection instance and calls the associateConnection method.

The method implementation for a ManagedConnection should dissociate the connection handle (passed as a parameter) from its currently associated ManagedConnection and associate the new connection handle with itself.

Specified by:
associateConnection in interface javax.resource.spi.ManagedConnection
Parameters:
handle - A connection handle to be reassociated.
Throws:
javax.resource.ResourceException - If handle passed is not of type IMSConnection.

cleanup

public void cleanup()
             throws javax.resource.ResourceException

Called by the application server to clean up any client-specific state data maintained by an IMSManagedConnection instance and put the IMSManagedConnection instance back in the pool. This includes invalidating all connection handles associated with the instance. The application server calls cleanup() after the end of a connection sharing scope or when the last associated connection handle is closed for an IMSManagedConnection instance.

The cleanup() method does not close the physical connection (for example, a TCP/IP socket) to IMS Connect.

Specified by:
cleanup in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException - A problem was encountered while resetting the state of this IMSManagedConnection instance.

destroy

public void destroy()
             throws javax.resource.ResourceException
Closes the physical connection and releases all system resources held by the associated IMSManagedConnection instance. It is called by the application server:

Specified by:
destroy in interface javax.resource.spi.ManagedConnection
Throws:
javax.resource.ResourceException - If problems were encountered in closing the connection.

getConnection

public java.lang.Object getConnection(javax.security.auth.Subject aSubject,
                                      javax.resource.spi.ConnectionRequestInfo aConnectionRequestInfo)
                               throws javax.resource.ResourceException

Called by the application server to create a new application-level handle to an object that represents an underlying physical connection (an IMSManagedConnection instance).

This method may be called by the application server to re-authenticate a physical connection (when the physical connection already exists in the pool under a different security context.) Re-authentication is allowed if no active connection handles are currently associated with the IMSManagedConnection instance. With re-authentication, the getConnection method changes the security context of the underlying IMS managed connection instance and returns a new connection handle in the form of an IMSConnection instance.

Specified by:
getConnection in interface javax.resource.spi.ManagedConnection
Parameters:
aSubject - Security information for container-managed EIS sign-on.
aConnectionRequestInfo - Security information for component-managed EIS sign-on.
Returns:
A new IMSConnection instance.
Throws:
javax.resource.ResourceException - An internal problem was encountered while executing the getConnection method.

getLocalTransaction

public javax.resource.spi.LocalTransaction getLocalTransaction()
                                                        throws javax.resource.ResourceException
Returns a javax.resource.spi.LocalTransaction instance that enables the application server to manage local transactions for the resource manager.

Specified by:
getLocalTransaction in interface javax.resource.spi.ManagedConnection
Returns:
A LocalTransaction instance.
Throws:
javax.resource.ResourceException
See Also:
IMSLocalTransaction

getLogWriter

public java.io.PrintWriter getLogWriter()
Returns a reference to the logWriter to allow the client application to write messages to the trace log.

Specified by:
getLogWriter in interface javax.resource.spi.ManagedConnection
Returns:
The logWriter property value.
See Also:
setLogWriter(java.io.PrintWriter)

getMetaData

public javax.resource.spi.ManagedConnectionMetaData getMetaData()
                                                         throws javax.resource.ResourceException
Returns the IMSMangedConnectionMetaData instance which contains information about the associated IMSManagedConnection instance.

Specified by:
getMetaData in interface javax.resource.spi.ManagedConnection
Returns:
The IMSMangedConnectionMetaData instance.
Throws:
javax.resource.ResourceException

getTraceLevel

public java.lang.Integer getTraceLevel()
Returns the value of the traceLevel property. The traceLevel value determines the level of detail written to the trace log.

Returns:
The trace level of the IMS managed connection instance.
See Also:
IMSTraceLevelProperties

getXAResource

public javax.transaction.xa.XAResource getXAResource()
                                              throws javax.resource.ResourceException
Returns a javax.transaction.xa.XAResource instance that enables the application server to demarcate global transactions with a resource manager .

An application server enlists this XAResource instance with a transaction manager if the ManagedConnection instance is used in a JTA transaction that is coordinated by the transaction manager.

Specified by:
getXAResource in interface javax.resource.spi.ManagedConnection
Returns:
An XAResource instance.
Throws:
javax.resource.ResourceException
See Also:
IMSXAResource

getMCFactory

public IMSManagedConnectionFactory getMCFactory()
Insert the method's description here.


removeConnectionEventListener

public void removeConnectionEventListener(javax.resource.spi.ConnectionEventListener aListener)
The application server uses the removeConnectionEventListener method to remove a connection listener from an IMSManagedConnection instance.

Specified by:
removeConnectionEventListener in interface javax.resource.spi.ManagedConnection

setLogWriter

public void setLogWriter(java.io.PrintWriter aLogWriter)
                  throws javax.resource.ResourceException
Sets the value of the logWriter property. A log writer is a character output stream to which all logging and tracing messages are printed.

Specified by:
setLogWriter in interface javax.resource.spi.ManagedConnection
Parameters:
aLogWriter - The new value for the logWriter property.
Throws:
javax.resource.ResourceException
See Also:
IMSTraceLevelProperties

setTraceLevel

public void setTraceLevel(java.lang.Integer aTraceLevel)
Sets the value of the traceLevel property.

Parameters:
aTraceLevel - The new value for the traceLevel property.
See Also:
IMSTraceLevelProperties

dissociateConnections

public void dissociateConnections()
                           throws javax.resource.ResourceException
Called by an application server that is capable of lazy connection association in order to dissociate a ManagedConnection instance from all of its connection handles.

Specified by:
dissociateConnections in interface javax.resource.spi.DissociatableManagedConnection
Throws:
javax.resource.ResourceException

Package All Classes All Fields and Methods Deprecated