+

Search Tips   |   Advanced Search

(ZOS) Use optimized local adapters to connect to an application in an external address space from a WebSphere application

Use this task when we want to use the outbound APIs to connect to an application in an external address space from an application that is deployed on WebSphere Application Server for z/OS .

The daemon group, address space, and external address space must be set up to use the optimized local adapters APIs. The external address space must be registered in the daemon group by calling the BBOA1REG API.

The application running in the external address space must have established itself as an optimized local adapters server task using one of the APIs, including BBOA1SRV, BBOA1RCA or BBOA1RCS.

The optimized local adapters resource adapter archive (RAR) file, ola.rar, is deployed and configured using the WAS administrative console or the olaRar.py script.


Tasks

  1. Locate the application deployment descriptor in the application that makes the external call. This is the application that is deployed on WAS for which we want to make an outbound call from.

  2. Create a resource reference that points to the optimized local adapter connection factory. The optimized local adapter connection factory is created when the ola.rar file is installed on WAS.
  3. Locate the connection factory for the optimized local adapter. We can find the connection factory by looking up the resource reference in the Java Naming Directory Interface (JNDI), for example:

      Context ctx = new InitialContext(); ConnectionFactory cf = ctx.lookup("java:comp/env/ola");

  4. Create a ConnectionSpecImpl method call and provide the register name to connect to. We can either use the Register name as an attribute on the managed connection factory or use the ConnectionSpecImpl method, setRegisterName, to provide the registration name for the application running in the external address space or subsystem to connect to. This must be the same registration name that was provided by the application in the external address space or subsystem using one of the server optimized local adapters APIs, BBOA1SRV, BBOA1RCA, or BBOA1RCS. For example,

      ConnectionSpecImpl csi = new ConnectionSpecImpl(); csi.setRegisterName ("MyRES1");

    Set the register name on the ConnectionSpecImpl object is not necessary if the register name was specified using the RegisterName custom property on the ConnectionFactory object.

    To use the resource adapter high availability feature, ensure that the application does not use the setRegisterName method and instead configure the target Register name in the managed connection's connection factory attributes. Refer to the topic, Enabling resource adapter high availability support, for more information on how to configure high availability.

  5. Optional: If we are calling an Information Management System (IMS) transaction that does not use the optimized local adapter server APIs, BBOA1SRV, BBOA1RCA, or BBOA1RCS, use this step to set the IMS Open Transaction Manager Access (OTMA) parameters. We can either set the IMS OTMA server name, XCF group ID and transaction level as attributes on the managed connection factory, or use the corresponding ConnectionSpecImpl setter methods, setOTMAServerName, setOTMAGroupID, and setOTMATranLevel, to provide this information for the application running in the external address space or subsystem to connect to.

    When we use optimized local adapters over OTMA, the registration name does not have a counterpart on the IMS transaction side. The registration name can be set, but it is not used for optimized local adapter calls over OTMA. See topic Calling existing IMS transactions with optimized local adapters over OTMA.

  6. Use the connection factory to create a connection, for example:
    Connection con = cf.getConnection(csi);
    

The application that is deployed on WAS is connected to an external address space and ready to call the services that are hosted on the external address space.


Related:

  • Calling existing IMS transactions with optimized local adapters over OTMA
  • Optimized local adapters for z/OS APIs
  • Optimized local adapters on WAS for z/OS
  • WAS transactions BBOC, BBO$, BBO#
  • Optimized local adapters environment variables
  • Install a resource adapter archive
  • Planning to use optimized local adapters for z/OS
  • Enable the server environment to use optimized local adapters
  • Enable optimized local adapters support in CICS
  • Use the optimized local adapters native APIs to invoke an EJB application from an external address space
  • 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
  • Calling an enterprise bean from an external address space while ignoring the client transaction context
  • Install enterprise application files
  • Install the WebSphere BBOC, BBO$ and BBO# transactions in CICS
  • Enable optimized local adapter high availability support