+

Search Tips   |   Advanced Search

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


What to do next

Deploy the EJB application.


Subtopics


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