com.mulesoft.adapter.ra
Class CCIConnection

java.lang.Object
  extended by com.mulesoft.adapter.ra.CCIConnection
All Implemented Interfaces:
javax.resource.cci.Connection

public class CCIConnection
extends Object
implements javax.resource.cci.Connection

CciConnection represents an JCA 1.0 compliant connection implementation. It is used by the XI AF module processor to access the resource adapter for the outbound (XI->ra) direction.


Method Summary
 void close()
          The XI AF module processor calls close() to free a connection if it will not be used anymore.
 javax.resource.cci.Interaction createInteraction()
          Factory method to create an interaction that operates on this connections According to JCA the relationship between connection:interaction is 1:n (CCI JCA 1.0)
 javax.resource.cci.LocalTransaction getLocalTransaction()
          Returns new local transaction.
 javax.resource.cci.ConnectionMetaData getMetaData()
          Returns the descriptive connection meta data of this connection (CCI JCA 1.0)
 javax.resource.cci.ResultSetInfo getResultSetInfo()
          Returns a result set Since result sets MUST NOT be used in the context of XI AF.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createInteraction

public javax.resource.cci.Interaction createInteraction()
                                                 throws javax.resource.ResourceException
Factory method to create an interaction that operates on this connections According to JCA the relationship between connection:interaction is 1:n (CCI JCA 1.0)

Specified by:
createInteraction in interface javax.resource.cci.Connection
Returns:
New created interaction associated with this connection
Throws:
javax.resource.ResourceException - Thrown if managed connection is invalid

getLocalTransaction

public javax.resource.cci.LocalTransaction getLocalTransaction()
                                                        throws javax.resource.ResourceException
Returns new local transaction. Since local transactions are not supported in this sample, a ResourceException is thrown. Note that supporting local transaction may become a MUST for XI AF compliant adapters (CCI JCA 1.0)

Specified by:
getLocalTransaction in interface javax.resource.cci.Connection
Returns:
New created local transaction
Throws:
javax.resource.NotSupportedException - Always thrown
javax.resource.ResourceException

getResultSetInfo

public javax.resource.cci.ResultSetInfo getResultSetInfo()
                                                  throws javax.resource.ResourceException
Returns a result set Since result sets MUST NOT be used in the context of XI AF. Hence a a ResourceException is thrown. (CCI JCA 1.0)

Specified by:
getResultSetInfo in interface javax.resource.cci.Connection
Returns:
A CCI result set
Throws:
javax.resource.NotSupportedException - Always thrown
javax.resource.ResourceException

close

public void close()
           throws javax.resource.ResourceException
The XI AF module processor calls close() to free a connection if it will not be used anymore. According to JCA 1.0 the CCI connection must delegate this information to the underlying managed connection. How this is done and whether the managed connection will be closed is ra implementation specific. In this sample the managedConnection is informed via removeCciConnection(). (CCI JCA 1.0)

Specified by:
close in interface javax.resource.cci.Connection
Throws:
javax.resource.ResourceException - Passed if thrown below

getMetaData

public javax.resource.cci.ConnectionMetaData getMetaData()
                                                  throws javax.resource.ResourceException
Returns the descriptive connection meta data of this connection (CCI JCA 1.0)

Specified by:
getMetaData in interface javax.resource.cci.Connection
Returns:
The connection meta data as specified by JCA 1.0
Throws:
javax.resource.NotSupportedException - Thrown if meta data object cannot be created
javax.resource.ResourceException


Copyright © 2012. All Rights Reserved.