EGL Reference Guide for iSeries


Generating into a directory

This page describes how to process Java code that is generated into a directory. It is recommended, however, that you avoid generating Java code into a directory; instead, follow the procedures described in Generating into a project.

For details on generating a COBOL program, see Generating for COBOL.

To generate Java code into a directory, specify the build descriptor option genDirectory and avoid specifying the build descriptor option genProject.

Your next tasks depend on the project type:

Application client project
For an application client project, do as follows:
  1. Provide preparation-time access to EGL jar files 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.

  2. Provide run-time access to fda.jar, fdaj.jar, and (if you are calling the generated program by way of TCP/IP) EGLTcpipListener.jar:
    • Access the jar files from the following directory:
      installationDir\wstools\eclipse\plugins\
      com.ibm.etools.egl.generators_version\runtime
      

      installationDir
      The WebSphere Studio installation directory, such as c:\myStudio
      version
      The installed version of the plugin; for example, 5.1.2

      Copy those files into each enterprise application project that references the application client project.

    • Update the manifest in the application client project so that the jar files (as stored in an enterprise application project) are available.
  3. Provide access to non-EGL jar files (an optional task)
  4. Import your generated output into the project, in keeping with these rules:
    • The folder appClientModule must include the top-level folder of the package that contains your generated output
    • The hierarchy of folder names beneath appClientModule must match the name of your Java package

    If you are importing generated output from package my.trial.package, for example, you must import that output into a folder that resides in the following location:

      appClientModule/my/trial/package
    
  5. If you generated a J2EE environment file, update that file
  6. Update the deployment descriptor
  7. Now that you have placed output files in a project, continue setting up the J2EE run-time environment
EJB project
For an EJB project, do as follows:
  1. Provide 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.

  2. Provide run-time access to the EGL jar files:
    • Access fda.jar and fdaj.jar from the following directory:
      installationDir\wstools\eclipse\plugins\
      com.ibm.etools.egl.generators_version\runtime
      

      installationDir
      The WebSphere Studio installation directory, such as c:\myStudio
      version
      The installed version of the plugin; for example, 5.1.2

      Copy those files into each enterprise application project that references the EJB project.

    • Update the manifest in the EJB project so that fda.jar and fdaj.jar (as stored in an enterprise application project) are available.
  3. Provide access to non-EGL jar files (an optional task)
  4. Import your generated output into the project, in keeping with these rules:
    • The folder ejbModule must include the top-level folder of the package that contains your generated output
    • The hierarchy of folder names beneath ejbModule must match the name of your Java package

    If you are importing generated output from package my.trial.package, for example, you must import that output into a folder that resides in the following location:

      ejbModule/my/trial/package
    
  5. If you generated a J2EE environment file, update that file.
  6. Update the deployment descriptor
  7. Set the JNDI name
  8. Generate deployment code
  9. Now that you have placed output files in a project, continue setting up the J2EE run-time environment
J2EE Web project
For a Web project, do as follows:
  1. Provide access to EGL jar files by copying fda.jar and fdaj.jar into your Web project folder. To do so, import the external jars found in the following directory:
    installationDir\wstools\eclipse\plugins\
    com.ibm.etools.egl.generators_version\runtime
    

    installationDir
    The WebSphere Studio installation directory, such as c:\myStudio
    version
    The installed version of the plugin; for example, 5.0.1

    The destination for the files is the following project folder:

      WebContent/WEB-INF/lib
    
  2. Provide access to non-EGL jar files (an option)
  3. Import your generated output into the project, in keeping with these rules:
    • The folder WebContent must include the top-level folder of the package that contains your generated output
    • The hierarchy of folder names beneath WebContent must match the name of your Java package

    If you are importing generated output from package my.trial.package, for example, you must import that output into a folder that resides in the following location:

      WebContent/my/trial/package
    
  4. Update the deployment descriptor
  5. Now that you have placed output files in a project, continue setting up the J2EE run-time environment
Java project
If you want to debug in a non-J2EE environment, you need an EGL-generated program properties file, which identifies various values that are specific to the program. The file is generated if you use the following combination of build descriptor options:

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.

For a Java project, your tasks are as follows:

  1. Provide access to EGL jar files 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.

  2. 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.
  3. If your generated code accesses MQSeries, provide access to non-EGL jar files
  4. Place the program properties file in the top-level project folder
  5. Place a linkage properties file in the project (an optional task)


Related tasks
Generating deployment code for EJB projects
Generating for COBOL
Generating into a project
Deploying a linkage properties file
Setting deployment-descriptor values
Providing access to non-EGL jar files
Setting the JNDI name for EJB projects
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
Updating the deployment descriptor manually
Updating the J2EE environment file


Related reference
genDirectory
genProject


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]