If you are generating a Java™ program or wrapper, it is recommended
(and in some cases required) that you set build descriptor option genProject,
which causes generation into a project.
EGL provides various services for you when you generate into a project.
The services vary by project type, as do your next tasks:
- Application client project
- When you generate into an application client project, EGL does as follows:
- Provides preparation-time access to EGL jar files (fda6.jar and fdaj6.jar)
by adding the following entries to the project's Java build path:
EGL_GENERATORS_PLUGINDIR/runtime/fda6.jar
EGL_GENERATORS_PLUGINDIR/runtime/fdaj6.jar
For details on
the variable at the beginning of each entry, see Setting the variable EGL_GENERATORS_PLUGINDIR.
- Provides runtime access to the EGL jar files:
- Imports the jar files into each enterprise application project that references
the application client project
- Updates the manifest in the application client project so that the jar
files in an enterprise application project are available
- Puts runtime values into the deployment descriptor so that you can avoid
cutting and pasting entries from a generated J2EE environment file; for an
overview of this subject, see Setting deployment-descriptor values
Your next tasks are as follows:
- If you are calling the generated program by way of TCP/IP, provide runtime
access to a listener, as described in Setting up the TCP/IP listener
- Provide access to non-EGL jar files
- Now that you have placed output files in a project, continue setting up
the J2EE runtime environment
- EJB project
- When you generate into an EJB project, EGL does as follows:
- Provides preparation-time access to EGL jar files (fda6.jar and fdaj6.jar)
by adding the following entries to the project's Java build path:
EGL_GENERATORS_PLUGINDIR/runtime/fda6.jar
EGL_GENERATORS_PLUGINDIR/runtime/fdaj6.jar
For details on
the environment variable at the beginning of each entry, see Setting the
variable EGL_GENERATORS_PLUGINDIR.
- Provides runtime access to the EGL jar files:
- Imports fda6.jar and fdaj6.jar into each enterprise application project
that references the EJB project
- Updates the manifest in the EJB project so that fda6.jar and fdaj6.jar
in an enterprise application project are available at run time
- Assigns the JNDI name automatically so that the EGL runtime code can access
the EJB code; but this step occurs only when you generate an EJB session bean.
- In most cases, puts runtime values into the deployment descriptor so that
you can avoid cutting and pasting entries from a generated J2EE environment
file; for an overview of this subject, see Setting deployment-descriptor
values.
EGL does not put runtime values into the deployment descriptor
if EGL cannot find the necessary session element in the deployment descriptor.
This situation occurs, for example, when the Java program is generated before the wrapper
or when the build descriptor option sessionBeanID is
set to a value that is not found in the deployment descriptor. For details
on session elements, see sessionBeanID.
Your next tasks are as follows:
- Provide access to non-EGL jar files
- Generate deployment code
- Now that you have placed output files in a project, continue setting up
the J2EE runtime environment
- J2EE Web project
- EGL does as follows:
- Provides access to EGL jar files by importing fda6.jar and fdaj6.jar into
the project's Web Content/WEB-INF/lib folder
- Puts runtime values into the deployment descriptor so that you can avoid
cutting and pasting entries from a generated J2EE environment file; for an
overview of this subject, see Setting deployment-descriptor values
Your next tasks are as follows:
- Providing access to non-EGL jar files
- Now that you have placed output files in a project, continue as described
in Setting up the J2EE runtime environment for EGL-generated code
- Java project
- If you are generating into a non-J2EE Java project for debugging or production
purposes, EGL does as follows:
- Provides access to EGL jar files (fda6.jar and fdaj6.jar) by adding the
following entries to the project's Java build path:
EGL_GENERATORS_PLUGINDIR/runtime/fda6.jar
EGL_GENERATORS_PLUGINDIR/runtime/fdaj6.jar
For details on
the variable at the beginning of each entry, see Setting the variable EGL_GENERATORS_PLUGINDIR.
- Generates a properties file, but only if the build descriptor includes
the following option values:
- genProperties is set to GLOBAL or PROGRAM; and
- J2EE is set to NO.
If you request a global properties file (rununit.properties),
EGL places that file in the Java source folder, which is the folder
that contains the Java packages. (The Java source folder may be either a folder
within the project or the project itself.) If you request a program properties
file instead, EGL places that file in the folder that contains the program.
At
run time, values in the program properties file are used to set up a standard
JDBC connection. For details, see Understanding how a standard JDBC connection
is made.
Now that you have placed output files in a project, do as follows:
- If your program accesses a relational database, make sure that your Java build
path includes the directory where the driver is installed. For DB2®, for example,
specify the directory that contains db2java.zip.
- If your code accesses MQSeries®, provide access to non-EGL jar files
- Place a linkage properties file in the module
For details on the consequence of generating into a non-existent project,
see genProject.