on 04-10-2017 8:30 AM
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()?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.