[z/OS]

Using optimized local adapters for inbound support

Use this task when you are implementing the optimized local adapters support for calling inbound to WebSphere® Application Server for z/OS® Enterprise JavaBeans (EJB) applications.

About this task

Use optimized local adapters to make inbound calls from an external address space to EJB applications that are deployed on a local WebSphere Application Server for z/OS server, and make outbound calls from an application running under WebSphere Application Server for z/OS to a server program that is running in an external address space. The following steps describe the process required to call an EJB application that is deployed on a local WebSphere Application Server for z/OS server using the optimized local adapters application programming interfaces (APIs).

The following illustration shows the flow when using optimized local adapters with Customer Information Control System (CICS®).The following illustration shows the flow when using optimized local adapters with Customer Information Control System (CICS).CICS inbound call to an application server EJB application

The next illustration is the flow when using optimized local adapters with Information Management System (IMS™). Legacy IMS inbound call to the application server via optimized local adapters

Procedure

  1. Enable the server environment. In this step, activate support for the optimized local adapters with the WebSphere environment variables in the WebSphere Application Server daemon group or cell. This prepares the WebSphere Application Server to receive inbound requests.
  2. Develop an EJB application. You can develop an EJB application or prepare an existing application. If you are calling to or from a Cobol or C/C++ program, you might want to use the IBM® Rational® Application Developer assembly tools, such as Rational® Application Developer, to create a Java™ class with getter and setter helper methods that correspond to the Cobol copybook or C/C++ structure, and create an EJB application to start with the optimized local adapter native APIs.

    For more information about using the assembly tools to convert a Cobol copybook or C structure into a Java data binding helper class, see the assembly tool information center.

    The assembly tools are shipped with the WebSphere Application Server for z/OS and contain the Java archive (JAR) file that contains the package, com.ibm.websphere.ola, that you must identify your enterprise bean as a potential target of an optimized local adapter call. This package contains the ExecuteHome and Execute classes that hold the abstract interfaces that are needed to call the adapter. You must create a stateless session bean that implements a method called execute() which accepts a byte array as input and returns a byte array as output and specifies the name com.ibm.websphere.ola.ExecuteHome for the EJB home interface and com.ibm.websphere.ola.Execute for the remote interface. The enterprise bean that you want to start from an external address space, must include a method called execute that accepts a byte array as input and returns a byte array as output. This is the method that you receive control in when an external address space uses one of the adapter API calls such as Invoke or Send Request. The execute method is defined on the remote interface, com.ibm.websphere.ola.Execute and contains the business logic for the application.

    Attention: Your EJB implementation must not modify or augment the home and remote interfaces in any way. Application exceptions are not supported on the execute method of the remote interface. If your application must throw an exception, it must throw an EJBException, which can optionally wrap the original exception encountered.
  3. Deploy the EJB application. After you have developed the EJB application, you must package it in an enterprise archive (EAR) file and deploy it on to WebSphere Application Server. This EJB application uses the home and remote interfaces provided in the com.ibm.websphere.ola package. Enterprise beans that are developed this way are assigned a Java Naming and Directory Interface (JNDI) home name and are deployed like any other EJB component. To learn more about installing the application, read the topic, Installing enterprise application files.
  4. (Optional) Use the CICS environment. Complete this step only if you are connecting to and using Customer Information Control System (CICS). If you are using CICS, use this step to activate the adapters in the CICS region to make outbound calls to EJB applications that you have deployed on your local WebSphere Application Server. The outbound calls are made with the optimized local adapters native APIs. If you are not using CICS, skip to the next step.
    Attention: Make sure that the product is using a SAF-based user registry if you plan to propagate a SAF user ID from WebSphere Application Server for z/OS to CICS.
  5. (Optional) Use the IMS environment. Complete this step if you are connecting to and using IMS applications.
  6. Register an external address space. For the optimized local adapter to make an inbound call to your local daemon group or WebSphere Application Server cell, you must bind the current address space to the WebSphere Application Server group and establish connection attributes.
  7. Secure optimized local adapters for inbound support.
  8. Make inbound calls. Depending on what you want to achieve and what systems you are working with, choose the method you want to use to make calls with the native APIs.
    1. Use the optimized local adapter native APIs to call a stateless session bean and connect from an external address space to WebSphere Application Server. In this method, you start an EJB application from an external native language program using the primitive APIs and retrieve the response. This method is designed for applications that want more flexibility and where the response area maximum length is not known before the call.
    2. Use the optimized local adapter Invoke API to call a stateless session bean and connect from an external address space to WebSphere Application Server. In this method, you start an EJB application with the Invoke API from an external native language program and retrieve a response. This method is designed for exploiters that want a simplified path where the response area length is known before the call.
    3. Use the optimized local adapter to call an EJB application from WebSphere Application Server from an external address space in a client-initiated transaction. In this method, you begin a transaction in a client environment, and call an EJB application that is running on WebSphere Application Server. The new transaction is propagated to the WebSphere Application Server. This method is only supported when calling from a transaction-enable environment, like CICS.
    4. Use the optimized local adapter to call an EJB application from WebSphere Application Server while ignoring the transaction context. In this method, you begin a transaction in a client environment, and call an EJB application that is deployed on WebSphere Application Server, and ignore the transaction context. This method is only supported when calling from a transaction-enable environment, like CICS.
  9. (Optional) Monitor optimized local adapters.

Results

You have implemented the optimized local adapters support to make inbound calls to EJB applications that are deployed on WebSphere Application Server

指出主題類型的圖示 作業主題



時間戳記圖示 前次更新: July 9, 2016 11:15
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tdat_useola_in
檔名:tdat_useola_in.html