Generating Java wrappers

The EGL Java™ wrapper is a set of classes used to invoke an EGL main or called program from non-EGL Java code; for example, from an action class in a Struts- or JSF-based J2EE web application or from a non-J2EE Java program. You can generate Java wrapper classes when you generate the related program.

A Java wrapper consists of a set of classes. Those classes act as an interface between a servlet or a non-EGL generated Java program, on the one hand, and a generated program or EJB session bean, on the other.

You generate the Java wrapper classes if you use a build descriptor that has these characteristics:

For further details on using the classes, see “Java wrapper classes.” For details on the class names, see “Output of Java wrapper generation.”

To use a Java wrapper perform the following steps:
  1. Generate Java wrapper classes, which are specific to a generated program
  2. Incorporate those wrapper classes into the non-generated Java code
  3. From the non-generated Java code, invoke the wrapper-class methods to make the actual call and to convert data between these two formats:
    • The data-type formats used by Java
    • The primitive-type formats required when passing data to and from the EGL-generated program

Feedback