EGL Reference Guide for iSeries
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. If you are generating a COBOL
program, however, you must use build descriptor option genDirectory,
which generates output into a directory.
For details on the relationship of genDirectory and
genProject, see genProject.
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 (fda.jar and
fdaj.jar) by adding the following entries to the project's Java
build path:
EGL_GENERATORS_PLUGINDIR/runtime/fda.jar
EGL_GENERATORS_PLUGINDIR/runtime/fdaj.jar
For details on the variable at the beginning of each entry, see
Setting the variable EGL_GENERATORS_PLUGINDIR.
- Provides run-time 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 run-time 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
run-time 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 run-time environment
- EJB project
- When you generate into an EJB project, EGL does as follows:
- Provides preparation-time access to EGL jar files (fda.jar and
fdaj.jar) by adding the following entries to the project's Java
build path:
EGL_GENERATORS_PLUGINDIR/runtime/fda.jar
EGL_GENERATORS_PLUGINDIR/runtime/fdaj.jar
For details on the environment variable at the beginning of each entry, see
Setting the variable EGL_GENERATORS_PLUGINDIR.
- Provides run-time access to the EGL jar files:
- Imports fda.jar and fdaj.jar into each enterprise
application project that references the EJB project
- Updates the manifest in the EJB project so that fda.jar and
fdaj.jar in an enterprise application project are available at run time
- Assigns the JNDI name automatically so that the EGL run-time code can
access the EJB code; but this step occurs only when you generate an EJB
session bean.
- In most cases, puts run-time 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 run-time 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 run-time environment
- J2EE Web project
- EGL does as follows:
- Provides access to EGL jar files by importing fda.jar and
fdaj.jar into the project's Web Content/WEB-INF/lib folder
- Puts run-time 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 Setting up
the J2EE run-time environment
- 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 (fda.jar and fdaj.jar) by
adding the following entries to the project's Java build path:
EGL_GENERATORS_PLUGINDIR/runtime/fda.jar
EGL_GENERATORS_PLUGINDIR/runtime/fdaj.jar
For details on the variable at the beginning of each entry, see
Setting the variable EGL_GENERATORS_PLUGINDIR.
- Generates a program properties file and places it in the top-level project
folder, but only if the build descriptor includes the following option
values:
- genProperties is set to GLOBAL or PROGRAM; and
- J2EE is set to NO.
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.
Related tasks
Generating deployment code for EJB projects
Deploying a linkage properties file
Setting deployment-descriptor values
Providing access to non-EGL jar files
Setting the variable EGL_GENERATORS_PLUGINDIR
Setting up the J2EE run-time environment for EGL-generated code
Understanding how a standard JDBC connection is made
Related reference
genDirectory
genProject
sessionBeanID
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.