Creating and using a ZIETrans EJB application

As an alternative to the usual ZIETrans project, which transforms one or more host applications and presents Web pages to an end user, you can build a ZIETrans Enterprise JavaBeans (EJB) project. A ZIETrans EJB project provides access to the host interactions, which are encapsulated in Integration Objects. The Integration Objects are needed to provide host data to an EJB client, which can be another ZIETrans application, a user-written Java™ program, a Web application, or even another EJB. A ZIETrans EJB project enables you to separate the collection of the host data from its presentation. If you have one or more Integration Objects that you want to be able to invoke from several ZIETrans projects, you can include them in a ZIETrans EJB project and call them from several other ZIETrans projects. When you have finished configuring your ZIETrans EJB project, you can assemble it as a ZIETrans EJB application.

Notes:

  1. This section assumes that you are familiar with basic EJB concepts. If not, refer to the Eclipse documentation on this subject, or the WebSphere® Knowledge Center for your version and edition of WebSphere Application Server.
  2. You cannot include an Integration Object that is configured to use Web Express Logon in a ZIETrans EJB project.
  3. If you have developed EJB projects in Host Publisher, you can import them into ZIETrans projects.

A ZIETrans EJB application does not interact directly with an end user, nor does it transform host screens. It does not contain the resources that are included in a ZIETrans project: screen customizations, templates, or transformations. A ZIETrans EJB application contains one or more Integration Objects, whose services it makes available to calling programs.

When you create ZIETrans EJB projects, a new view is opened in ZIETrans Toolkit. This view is called the ZIETrans EJB Project view. It is analogous to the ZIETrans Projects view, but it contains only ZIETrans EJB projects. It shows the EJB resources that are described in this section. To work with your ZIETrans EJB project, you can use the ZIETrans EJB Project view in the same ways that you use the ZIETrans Projects view for other ZIETrans projects. For example, you can click the project name in the ZIETrans EJB Project view and then click the host terminal icon to open the host terminal for the project's main connection, in order to record macros.

A ZIETrans EJB application is an enterprise archive (EAR file) made up of one or more Integration Objects, whose services it makes available to an EJB client and typically consists of these parts:

A ZIETrans project (Web module), which includes:
  • One or more EJB Access Beans. The EJB Access Bean locates the ZIETrans EJB, creates an instance of the EJB, and invokes the main business method of the EJB, passing as input an Integration Object properties object, which contains the Integration Object properties that are set by the JSP.
  • One or more JSPs that interface with an EJB Access Bean as if driving an Integration Object locally. These resources appear in the ZIETrans Projects view.
A ZIETrans EJB Project (EJB Module) that consists of:
  • The ZIETrans EJB. The ZIETrans EJB is implemented as a stateful session EJB.
  • One or more Helper objects. The Helper object is invoked with the input parameters, and causes the actual Integration Object function to be driven. When the Integration Object completes, the new instance of an Integration Object properties object is returned to the EJB Access Bean.
  • One or more Integration Objects (.java files)
  • One or more connection definitions (.hco files)
  • Optionally, one or more connect and disconnect macros (.hma files)
  • One or more macros from which Integration Objects can be created (.hma files)
  • An application file (application.hap)
  • EJB support files (*.java files)

These resources appear in the ZIETrans EJB Project View.

In addition to providing the ZIETrans EJB, ZIETrans EJB support generates an EJB Access Bean for each Integration Object. This EJB Access Bean has the same signature as the Integration Object, allowing applications and JSPs to be developed to drive an Integration Object using the EJB Access Bean. Because the EJB Access Bean has the same signature as the Integration Object, the EJB Access Bean can be used in client-side code exactly as the original Integration Object would be used. Therefore, the client can be:

Figure 1. A ZIETrans EJB project