IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Adapter Toolkit > Implementing code from the IBM WebSphere Adapter Toolkit
Outbound support
Outbound support enables application components to process operations on an EIS and retrieve the results. Input data passed by the application component is processed by the adapter to make changes or call functions on the underlying EIS.
Issuing outbound requests to a WebSphere adapter is no different than interacting with any other JCA adapter as described in the JCA specification. The basic idea is as follows:
- A CCI client (for example, an EJB or other business process) looks up a connection factory for the adapter using a JNDI service provided by the application server.
- The CCI client requests a resource adapter connection from that factory.
- The CCI client then uses that connection to pass data to, and receive data from, the underlying EIS.
The parts of this process that vary among adapters involve the data structures exchanged and the operation-specific parameters passed.
The data structure for all WebSphere resource adapters for outbound requests is a WebSphere business object wrapped in a WBIRecord implementation.
The parameters of the operation for any JCA adapter are defined through an adapter-specific InteractionSpec instance; this class can contain 0..n properties that specify details about the operation to perform. For WebSphere resource adapters, a default WBIInteractionSpec class has one property: FunctionName. Invoking components set the operation to perform in the FunctionName property. (This is different from the verb that is defined in the actual business object). You are strongly encouraged to use this InteractionSpec class.
For example:
WBIConnection conn; WBIRecord input; WBIRecord output; ... Interaction ix=conn.createInteraction(); WBIInteractionSpec ixSpec=new WBIInteractionSpec(); ixSpec.setFunctionName(WBIInteractionSpec.CREATE); output = ix.doExecute(ixSpec, input);
- Application sign-on
The Adapter Foundation Classes can use either container-managed or component-managed authentication or sign-on.- Implementing outbound support
You enable outbound support by providing an EIS-specific implementation of a resource adapter. This requires extending the Adapter Foundation Class implementations of common client interfaces (Connection, Interaction, and Metadata) and the ManagedConnection and ManagedConnectionFactory interfaces.
- Implementing transaction support
A transaction is an isolated interaction with the EIS. Transaction support allows users to ensure that multiple operations on the EIS are performed as atomic units and are not impacted by other simultaneously occurring operations from other EIS clients.- Use command patterns
Command patterns simplify adapter development by providing generic logic for dealing with hierarchical data structures.- Manage stale connections
Connection-related problems can be resolved in your adapter using the two properties, connectionRetryLimit and connectionRetryInterval defined in the Managed connection factory of your adapter.