|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mulesoft.adapter.ra.CCIConnectionFactory
public class CCIConnectionFactory
CciConnectionFactory serves as factory for the sample CCI connections.
In addition it is able to deliver the message RecordFactory.
The CciConnectionFactory itself is created by the ManagedConnectionFactory
connection to an adapter within the XI AF.
For JNDI look-up purposes a ConnectionFactory like this must also implement
Serializable and Referenceable.
| Constructor Summary | |
|---|---|
CCIConnectionFactory()
The JCA specification requires a default constructor for ConnectionFactory (pg. |
|
CCIConnectionFactory(javax.resource.spi.ManagedConnectionFactory mcf)
In case of the two-tier approach non ConnectionManager object is passed to the
ManagedConnectionFactory whereas in the J2EE approach it is. |
|
CCIConnectionFactory(javax.resource.spi.ManagedConnectionFactory mcf,
javax.resource.spi.ConnectionManager cm)
This constructor is used in the context of XI AF: The J2EE server passed a ConnectionManager object
via the createConnectionFactory call to the ManagedConnectionFactory, which in turn
will call this constructor with itself and the ConenctionManager object as argument. |
|
| Method Summary | |
|---|---|
javax.resource.cci.Connection |
getConnection()
The main task for the ConnectionFactory is to create/return CCI connections for the XI AF. |
javax.resource.cci.Connection |
getConnection(javax.resource.cci.ConnectionSpec spec)
The second getter method returns a connection based on additional (selection) information which are contained in the ConnectionSpec object. |
javax.resource.cci.ResourceAdapterMetaData |
getMetaData()
getMetaData() returns meta data information of the resource adapter as specified in JCA |
javax.resource.cci.RecordFactory |
getRecordFactory()
getRecordFactory() must return the XI AF messageFactory. |
Reference |
getReference()
Returns the stored Reference object. |
com.sap.aii.af.lib.ra.cci.XIConnectionSpec |
getXIConnectionSpec()
Returns a specific CCI ConnectionSpec for NetWeaver XI (XI specific) |
com.sap.aii.af.lib.ra.cci.XIRecordFactory |
getXIRecordFactory()
Returns the NetWeaver XI record factory (NetWeaver specific) |
void |
setReference(Reference ref)
ConnectionFactory implementing classes must also implement the Referenceable
interface (see pg. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CCIConnectionFactory()
throws javax.resource.ResourceException
ConnectionFactory (pg. 199)
although it is actually not used by the ManagedConnectionFactory.
It may be used for the two-tier approach and is not relevant for the XI AF.
(CCI JCA 1.0)
javax.resource.ResourceException - If manager creation fails or access to XI MessageFactory returns an error
public CCIConnectionFactory(javax.resource.spi.ManagedConnectionFactory mcf)
throws javax.resource.ResourceException
ConnectionManager object is passed to the
ManagedConnectionFactory whereas in the J2EE approach it is. The JCA specification requires
that resource adapters have a default ConnectionManager implementation for the first case
that must not be used in the second. To fulfill the JCA specification this sample ConnectionFactory
class offers a two-tier instantiation method which is not relevant for XI AF.
(ra implementation specific)
mcf - ManagedConnectionFactory that creates this CciConnectionFactory
javax.resource.ResourceException - Thrown if mcf is not of sample
public CCIConnectionFactory(javax.resource.spi.ManagedConnectionFactory mcf,
javax.resource.spi.ConnectionManager cm)
throws javax.resource.ResourceException
ConnectionManager object
via the createConnectionFactory call to the ManagedConnectionFactory, which in turn
will call this constructor with itself and the ConenctionManager object as argument.
(ra implementation specific)
mcf - ManagedConnectionFactory that creates this CciConnectionFactorycm - ConnectionManager of the J2EE server
javax.resource.ResourceException - Thrown if mcf is not of sample| Method Detail |
|---|
public javax.resource.cci.Connection getConnection()
throws javax.resource.ResourceException
ConnectionFactory is to create/return CCI connections for the XI AF.
The first of two getter methods returns a connection without any additional selection criterias.
The ConnectionFactory delegates this request to the (J2EE) ConnectionManager which in turn
communicates with the ManagedConnectionFactory to retrieve an existing connection or
create a new one.
getConnection in interface javax.resource.cci.ConnectionFactoryjavax.resource.ResourceException
public javax.resource.cci.Connection getConnection(javax.resource.cci.ConnectionSpec spec)
throws javax.resource.ResourceException
ConnectionSpec object. For the XI AF objects of
class XIConnectionSpec must be used here. XIConnectionSpec implements
ConnectionSpec
getConnection in interface javax.resource.cci.ConnectionFactoryspec - ConnectionSpec with a kind of selection specification to find a connection
with particular properties.
javax.resource.ResourceException - Thrown if spec is not a CciConnectionSpec or of connection cannot be allocated
(CCI JCA 1.0)
public javax.resource.cci.ResourceAdapterMetaData getMetaData()
throws javax.resource.ResourceException
getMetaData() returns meta data information of the resource adapter as specified in JCA
getMetaData in interface javax.resource.cci.ConnectionFactoryjavax.resource.ResourceException - Thrown if meta data object cannot be instantiated
(CCI JCA 1.0)
public javax.resource.cci.RecordFactory getRecordFactory()
throws javax.resource.ResourceException
getRecordFactory() must return the XI AF messageFactory.
The XI AF uses this returned message factory to create the messages which are given to
the resource adapter in the interaction afterwards.
Note that the messageFactory can be used for the inbound direction as well to create the
messages which are given to the XI AF via ejb.onMessage()
The usage of the XI AF MessageFactory ensures that the customer records
implement the Message interface AND that the implementing object is a XI message.
- Specified by:
getRecordFactory in interface javax.resource.cci.ConnectionFactory
- Returns:
- RecordFactory implementing object of class
MessageFactory
- Throws:
javax.resource.ResourceException - Thrown if record factory object cannot be instantiated
(CCI JCA 1.0)
public void setReference(Reference ref)
ConnectionFactory implementing classes must also implement the Referenceable
interface (see pg. 199 JCA specification). The reason is that ConnectionFactory objects
are retrieved by JNDI lookups.
(CCI JCA 1.0)
ref - Reference object to store.public Reference getReference()
Reference object.
(CCI JCA 1.0)
getReference in interface ReferenceableReference object if stored, null otherwise.
public com.sap.aii.af.lib.ra.cci.XIConnectionSpec getXIConnectionSpec()
throws javax.resource.NotSupportedException
getXIConnectionSpec in interface com.sap.aii.af.lib.ra.cci.XIConnectionFactoryjavax.resource.NotSupportedException
public com.sap.aii.af.lib.ra.cci.XIRecordFactory getXIRecordFactory()
throws javax.resource.NotSupportedException,
javax.resource.ResourceException
getXIRecordFactory in interface com.sap.aii.af.lib.ra.cci.XIConnectionFactoryjavax.resource.NotSupportedException
javax.resource.ResourceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||