JEE environment file

In addition to the properties associated with EGL parts, there are a number of Java™ runtime properties that control access to databases, files, and other resources. To help distinguish them from EGL properties, and to emphasize the fact that they are not properties under JEE, this documentation may refer to these Java runtime properties as settings.

When you generate Java code, and you have the genProperties build descriptor option set to GLOBAL or PROGRAM, the settings in various build descriptor options are stored as Java runtime properties, and are written to one of three locations: A JEE environment file is a text file that contains property-and-value pairs that are derived from information that you specify in the build descriptor part, by setting certain build descriptor options. Other sources of information are the resource associations part, and the linkage options part, which are other build parts.

The JEE environment file is created when you have set the j2ee build descriptor option to YES, and you have set the genDirectory build descriptor option instead of the genProject build descriptor option. Alternatively, a JEE environment file is also created when you have set the j2ee build descriptor option to YES, and you have set the genProject build descriptor option to a non-JEE project.

Note: The JEE environment file contains XML tags that would normally have been written to the JEE deployment descriptor, if you had chosen to generate to a valid JEE project. This file will not be automatically updated the next time you generate. If you are generating code to an outside directory for import into another project later, remember that you must manually copy the XML tags from the JEE environment file, and paste into the JEE deployment descriptor for your project.

Updating the JEE environment file

The JEE environment file contains a series of entries like the following example:
  <env-entry>
    <env-entry-name>vgj.nls.code</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>ENU</env-entry-value>
  </env-entry>
The order of sub-elements is determined by the j2eeLevel build descriptor option. The example above uses the order name-type-value, which is consistent with JEE 1.4 and above; if the j2eeLevel build descriptor option is set to 1.3, the order of sub-elements is name-value-type. For the example above, a setting of JEE 1.3 would change the order of the sub-elements to:
  <env-entry>
    <env-entry-name>vgj.nls.code</env-entry-name>
    <env-entry-value>ENU</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
  </env-entry>
The name-type-value order is needed for all web projects, EJB and application client projects that run in JEE 1.4 and above. For web projects that run in JEE 1.3, the order name-value-type is used instead.

This step can be avoided if you generate directly into a project instead of into a directory. When you generate into a project, EGL can determine the type of project you are using and generate the environment entries in the appropriate order. Also, the serverType build descriptor option can affect the default level of the j2eeLevel build descriptor option.


Feedback