Start of Content Area

Function documentation Adapter Framework Module Interfaces  Locate the document in its SAP Library structure

Use

The module processor controls the message flow between the messaging service and the JCA adapters on the J2EE Enterprise JavaBean application level.

Interface Overview

Characteristic

Value

Name

AF module interface

Purpose

Writes adapter-specific or general Adapter Framework modules.

Type

J2EE library and EJB

Technical name

com.sap.aii.af.mp.module

Certification

Optional

Syntax

See Javadoc (.\index.html) package com.sap.aii.af.mp.module

Integration

In the message flow to the receiver the messaging service calls the module processor.

In the message flow from the sender it is called by the adapter (or an adapter Enterprise JavaBean).

Features

The main task of the module processor is to call the modules in the module chain in the sequence in which they are defined in the Integration Directory. The output of module n is the input for module n+1. See also: Module Processor

The module processor provides all modules with context information (for example, the current ID for the communication channel) or access to the configuration data of the module.

The Adapter Framework modules must implement stateless message operations, for example, technical conversions.

The Adapter Framework module Application Programming Interface consists of the following classes and interfaces:

Classes and Interfaces

Class or Interface

Use

Modules

The module interface implemented by the module processor

ModuleData

The data container that transports the message (main data) and the additional objects (additional data) between the modules does not have a type.

ModuleContext

The module processor gives the module configuration to the module so that it does not have to use the Adapter Framework configuration application programming interface.

ModuleException

When an error occurs, a module must raise a module exception.

ModuleException can contain an exception that describes the cause of the error. To provide hints about resolving the error, the error cause is written to the trace.

To process the message again, you do not need to set a special exception.

In the case of receiver adapters, the messaging service for the adapter framework processes the message again. The conditions for this are set in the communication channel monitor.

In the case of sender adapters, you must decide in the adapter implementation whether processing the message again makes sense.

ModuleLocalHome, ModuleHome, ModuleRemote, ModuleLocal

Standard Enterprise JavaBeans 2.0 interfaces, which must be used if the module is implemented as a local or remote EJB.

ModuleCategories

Help class to generate module-specific trace and audit log entries.

Note

uml_module.wmf contains the class diagram in UML format. Open Word and import uml_module.wmf as a graphic.

For a detailed description of the classes and interfaces, see the Javadoc documentation.

Activities

The following default modules are shipped with the Adapter Framework. You must use them all in the module chain:

      ModuleProcessorExitBean

If you use the recommended Adapter Framework CCI interface in the receiver direction, this module must be the last in the module chain. It recognizes the following parameters:

       JNDIName, for example, deployedAdapters/sample_ra/sharable/sample_ra is the JNDI name of the deployed JCA adapter

       username, for example, administrator, technical account that requests the CCI connection

       pw, for example, sap, account password

      CallSapAdapter

In the sender direction, this module must be called last in the module chain. It does not use any configuration parameters.

Example

The example module ConvertCRLFfromToLF is shipped with the Adapter Framework. It shows the processing of text payloads in which carriage return line feed (CRLF) line breaks are converted to line feed (LF) or the other way around.

This module is installed with the Adapter Framework and you use it as follows:

...

       1.      Select aReceiver communication channel of type JCA example adapter.

       2.      Select the Module tab page, choose This graphic is explained in the accompanying text (Switch Between Display and Edit Modes), and add a line in the Processing Sequence.

       3.      Make the following entries:

                          a.      Module Name: SAP XI Sample/ConvertCRLFfromToLF

                          b.      Type: L

                          c.      Use the module key, or specify a key of your choice.

                            d.      Confirm your entries with RETURN.

       4.      In the module configuration, add a new line and specify the following:

                            a.      Select the module key.

                          b.      Parameter Name: mode

                          c.      Parameter Value: CRLFtoLF

                            d.      Confirm your entries with RETURN.

The ConvertCRLFfromToLF module must be the first in the module chain in the receiver channel or the penultimate module before CallSAPAdapter in the sender channel. The convert parameter can have the following values:

      CRLFtoLF: All CRLF is replaced by LF

      LFtoCRLF: All LF is replaced by CRLF

      None: No conversion (for test purposes)

More information: Example Adapter and Example Module

 

End of Content Area