cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI custom adapter entry point/data flow

Former Member
0 Kudos

I'm working on a custom adapter that will need to connect to an EIS, fetch some data

and write it to a channel. My starting point was this tutorial (which modifies the default

file adapter present in sap po).

In the SPIManagedConnectionFactory there are a number of methods called by the

J2EE engine: start(), startMCF()/stop(), stopMCF().

The call hierarchy starts a local thread over the SPIManagedConnectionFactory

instance (as it implements Runnable):

start() --> startMCF() --> startRunnable()

which executes the run() method in a separate thread.

In run(), a ModuleProcessor object is instantiated:

ModuleProcessor mp = null;

mp = lookUpModuleProcessor(propWaitNum);

where the lookup method is:

private ModuleProcessor lookUpModuleProcessor(int retryNum) 
                           throws ResourceException {

final String SIGNATURE = "lookUpModuleProcessor()";
TRACE.entering(SIGNATURE);
ModuleProcessor mp = null;
try {
    mp = 
    ModuleProcessorFactory.getModuleProcessor(true, retryNum, propWaitTime);
} catch (Exception e) {
    throw re;
}
    TRACE.debugT(SIGNATURE, XIAdapterCategories.CONNECT_AF, "Lookup of XI AF    MP entry ejb was succesfully.");
    TRACE.exiting(SIGNATURE);
    return mp;
}

Later in the code, the run() method invokes method runChannel()

that connects to an HTTP end point and retrieves a response as a byte array.

It then calls createMessage() which creates

message object, wraps it around a ModuleData object and it sends it to the

ModuleProcessor:

// Process the module
ModuleProcessorFactory.getModuleProcessor(true, 1, 1000).process(channel.getObjectId(), md);

Thus, it seems that the SPIManagedConnectionFactory object is a client to the adapter.

Is this correct?

Is the factory object sending data to the adapter which is later processed by a

CCIInteraction object in method execute()?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member190389
Active Contributor

Hello ,

May be its too late. But for others.

Adapter has three parts.

1) session management

2) Transaction managemnt

3) Security management

CCIInteraction class deals with transaction management for Receiver Adapter..

The call method here is the place where you send data to your EIS and.expect a response if synchronous.

The Session has already been established in the SPIManagedConnection when you arrive at this point.

Regards

Fariha