+

Search Tips   |   Advanced Search

(ZOS) WebSphere Optimized Local Adapter (WOLA) remote work request on an Enterprise Java Bean target

This feature allows a client application such as batch, CICS, etc. to contact a remote WebSphere Application Server server instance hosting an application whose business logic execution and results are required by the client. The remote invocation is done by leveraging the BBOA1INV/BBGA1INV and BBOA1SRQ/BBGA1SRQ APIs and a proxy application (RemoteEJBProxy), which is shipped with WAS for z/OS .

Before installing this feature, review the requirements and configuration settings:

  1. Federate the remote WebSphere Application server instance's name space to the local z/OS WAS to enable the local server to look up the application on the remote server. The remote application must be a stateless Enterprise Java Bean that implements a method called execute(), which accepts a byte array as input and returns a byte array as output, as defined by the com.ibm.websphere.ola.Execute interface. It must also specify the name com.ibm.websphere.ola.ExecuteHome for the EJB home interface and com.ibm.websphere.ola.Execute for the remote interface when using the EJB 2.1 or earlier specifications, or must define the annotation @RemoteHome specifying com.ibm.websphere.ola.ExecuteHome when using the EJB 3.0 specification. These interfaces are available at runtime in both WAS for z/OS and WAS for distributed platforms. For remote application development purposes, the mentioned interfaces are shipped with the WAS for z/OS as part of the ola_apis.jar assembly tool. Do not package these interfaces with the application EAR file.

  2. Install the optimized local adapters proxy EAR (ola_proxy.ear) file containing the RemoteEJBProxy application on the local z/OS WAS server instance. The EAR file can be found in the $(WAS_INSTALL_ROOT)/installableApps directory of the WAS for z/OS file system.

    The remoteEJBProxy application is bound by default to JNDI name: ejb/com/ibm/ws390/ola/jca/RemoteEJBProxyHome. If for any reason the default value must be changed, the proxy application's target resource JNDI name can be customized through the administrative console page under Applications > ola_proxy > EJB JNDI Name > JNDI Name for all interfaces. If the JNDI name is updated, the WebSphere runtime must be made aware of the change by setting the ola_remote_ejb_proxy_jndiname environment variable as discussed in the topic, Optimized local adapters environment variables.

    that changing the remoteEJBProxy application's default JNDI name is an optional step. It is not required unless we need it to be changed.

  3. Restart the servers.

The invocation procedures for the Invoke (BBOA1INV/BBGA1INV) and send request (BBOA1SRQ/BBGA1SRQ) APIs are the same as those for local invocations, with the only difference being that the invocation request type parameter (requesttype) must be set to 2 as discussed in the Optimized local adapters for z/OS APIs topic.

The service name (JNDI name) specified on the invoke or send request API calls should be the name that the local WAS for z/OS would use to look up the remote application using the federated JNDI namespace for the remote server. For example, if the remote server's namespace was federated at location remote/server5, and the application is installed using JNDI name ejb/myRemoteApp on the remote server, then the service name specified on the invoke API or the send request API would be remote/server5/ejb/myRemoteApp.

This feature also provides the capability of invoking the remote application within a client initiated global transaction. When using a CICS client within a global transaction, the outcome might result in an ABEND ASP3 when CICS detects that the transaction rolled back after it issued a command to commit the global transaction. This is an expected case given CICS handling of such a scenario. The rollback behavior is also an expected behavior in cases where an error condition takes place while processing the EJB invocation such that the global transaction's outcome cannot be other than rollback.


Related:

  • Optimized local adapters environment variables
  • Optimized local adapters for z/OS APIs
  • Configure optimized local adapters in development mode on the remote z/OS node
  • Configure optimized local adapters in development mode on the local node
  • Use the Invoke API to call an enterprise bean from an external address space
  • Calling an enterprise bean from an external address space within a client-initiated transaction