Use this task when you want to use the Invoke API to call
a stateless session bean from an external address space that is in
an application that is deployed on a locally attached WebSphere® Application Server for z/OS®.
Before you begin
The WebSphere Application Server daemon group must be active
on the same z/OS image that the register request originates from.
Ensure that the current address space has already registered and is
bound to the target WebSphere Application Server cell using the Register
API.
About this task
This method is designed for high-level exploiters looking
for a simplified path where the response area length is known beforehand.
Procedure
- Set up the client address space native language application,
such as Cobol, PL/I, C/C++, or assembler program, to gather its parameters
and designate the target service name as the Java® Naming
and Directory Interface (JNDI) home interface path name for the stateless
session bean that it wants to invoke.
- Call the Invoke (BBOA1INV) API. In the target
Enterprise JavaBeans® (EJB) application, the execute
method runs and then invokes any business logic that is required before
returning the response data as a serialized byte array back to the
native language caller.
- Review the response data. A 0 (zero) return
code and reason code indicates that the client Invoke API completed
successfully and the response data and response data length are saved
in the areas designated by the caller.
- The client application repeats these steps using the same
register name call, calling as many stateless session beans as needed,
and as often as needed.
Attention: With this
API, the three primitive functions, Send_Request, Receive_RespLen,
and Get_Data are all completed using the Invoke API. The calling thread
is blocked until the response data is received and copied to the response
area.
Results
The client invoked a stateless session bean from WebSphere Application Server using the optimized local adapter Invoke API.