Develop an EJB application.
Enable the server environment.
Parent
Use optimized local adapters for inbound support
We can develop an EJB application or prepare an existing application. If we 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 WAS for z/OS and contain the JAR file containing the package, com.ibm.websphere.ola, that you must identify the 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. 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 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.
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 the application must throw an exception, it must throw an EJBException, which can optionally wrap the original exception encountered.
Subtopics
- (zos) Use the optimized local adapters native APIs to invoke an EJB application from an external address space
Use this task when to use the optimized local adapters native APIs to connect an external address space to WebSphere Application Server for z/OS and invoke an EJB application that is deployed on the application server.
- (zos) Use the Invoke API to call an enterprise bean from an external address space
Use this task when 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.
- (zos) Calling an enterprise bean from an external address space within a client-initiated transaction
Use this task when you call an EJB application that is deployed on WebSphere Application Server for z/OS from an external address space within a client-initiated transaction. The Customer Information Control System (CICS) environment is the only environment where transactional support is supported.
- (zos) Calling an enterprise bean from an external address space while ignoring the client transaction context
Use this task when to call an EJB application that is deployed on WebSphere Application Server for z/OS from an external address space while ignoring the client transaction context.
- Assemble applications
Application assembly consists of creating Java EE modules that can be deployed onto application servers. The modules are created from code artifacts such as WAR files, resource adapter archive (RAR) files, enterprise bean (EJB) JAR files, and application client archive (JAR) files. This packaging and configuring of code artifacts into EAR modules or stand-alone web modules is necessary for deploying the modules onto an application server.
What to do next
Deploy the EJB application.
Subtopics
- (zos) Use the optimized local adapters native APIs to invoke an EJB application from an external address space
Use this task when to use the optimized local adapters native APIs to connect an external address space to WebSphere Application Server for z/OS and invoke an EJB application that is deployed on the application server.
- (zos) Use the Invoke API to call an enterprise bean from an external address space
Use this task when 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.
- (zos) Calling an enterprise bean from an external address space within a client-initiated transaction
Use this task when you call an EJB application that is deployed on WebSphere Application Server for z/OS from an external address space within a client-initiated transaction. The Customer Information Control System (CICS) environment is the only environment where transactional support is supported.
- (zos) Calling an enterprise bean from an external address space while ignoring the client transaction context
Use this task when to call an EJB application that is deployed on WebSphere Application Server for z/OS from an external address space while ignoring the client transaction context.
- Assemble applications
Application assembly consists of creating Java EE modules that can be deployed onto application servers. The modules are created from code artifacts such as WAR files, resource adapter archive (RAR) files, enterprise bean (EJB) JAR files, and application client archive (JAR) files. This packaging and configuring of code artifacts into EAR modules or stand-alone web modules is necessary for deploying the modules onto an application server.
Related tasks
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 Assembling applications