This topic applies only on the z/OS operating system.

Using optimized local adapters to connect to an application in an external address space from a WebSphere application

Use this task when you 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®.

Before you begin

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 that is 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 WebSphere Application Server administrative console or the olaRar.py script.

Procedure

  1. Locate the application deployment descriptor in the application that will make the external call. This is the application that is deployed on WebSphere Application Server for which you 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 WebSphere Application Server.
  3. Locate the connection factory for the optimized local adapter. You 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. You 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 that is running in the external address space or subsystem that you want 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");
    Attention: Setting 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.
  5. [Fix Pack 12 or later] Optional: If you 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). You 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 that is running in the external address space or subsystem that you want to connect to.
  6. Use the connection factory to create a connection, for example:
    Connection con = cf.getConnection(csi);

Results

Your application that is deployed on WebSphere Application Server is connected to an external address space and ready to make calls to the services hosted on the external address space.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Oct 21, 2010 10:04:34 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-mp&topic=tdat_connect2wasapp
File name: tdat_connect2wasapp.html