The RFC Server Module implements the init(), terminate(), pollForEvents(), and process() methods.
This section describes:
The init() method creates a main thread that spawns a configurable number of listener threads which open a handle to the SAP Gateway. If the connector fails to initialize, it terminates using the terminate() method. The connector terminates by disconnecting the connection to the SAP Gateway.
During the initialization process, the RFC Server Module registers with the SAP Gateway using a specified Program ID. This Program ID must be set using the RfcProgramID connector configuration property and set up as a TCP/IP port in the SAP application. For more information on setting up a TCP/IP port, see Registering the RFC Server Module with the SAP Gateway.
All processing of WebSphere business objects for the RFC Server Module is initiated by an RFC-enabled function in an SAP application. In the RFC Server Module, an RFC Server-specific business object handler supports only one RFC-enabled function; therefore, for each supported function in the SAP application, you must have an associated RFC Server-specific business object handler. In addition, you must have an associated business object for each RFC Server-specific business object handler.
Figure 56 illustrates business object processing for the RFC Server Module.
Business object processing for the RFC Server Module executes in the following manner:
The RFC Server Module uses the SAP Gateway to maintain the processing order of events and to maintain the status of events. Since the listener threads make synchronous calls, an event must return to the SAP Gateway before it can be considered successfully processed.
IBM WebSphere Business Integration Adapter for mySAP.com includes a tool, SAPODA, that generates business object definitions based on an RFC-enabled function. SAPODA interprets the interface of an RFC-enabled function, maps its interface parameters to the business object attributes, and adds the application-specific information for each attribute.
For each business object definition, you must generate an associated RFC Server-specific business object handler, which invokes the corresponding business object. For more information on developing business objects and RFC Server-specific business object handlers, see Developing business objects for the RFC Server Module.