Setting JEE deployment descriptor values

An important task is to place runtime values, which are similar to environment-variable values, into the deployment descriptor of your JEE module. For example, you can interact with a workbench editor listed in the table below.

Project type Name of deployment descriptor How to assign values
application client application-client.xml Use the XML editor, Design tab
EJB ejb-jar.xml Use the EJB editor, Beans tab
JEE web web.xml Use the web.xml editor, Environment tab
The recommended way to update the deployment descriptor is to add content automatically, as happens if all of the following conditions apply:
  • You are generating a Java program or wrapper
  • You set the genProperties build descriptor option to GLOBAL or PROGRAM
  • You are generating for a JEE run time by setting j2ee to YES
  • You set the genProject build descriptor option to a valid JEE project
EGL never deletes a property from an existing deployment descriptor, but does the following actions:
  • Overwrites properties that already exist
  • Appends properties that do not exist
Another method of updating the deployment descriptor is to copy and paste values from the JEE environment file, which is created during generation if all of the following conditions apply:
  • You are generating a Java program
  • You set the genProperties build descriptor option to GLOBAL or PROGRAM
  • You are generating for a JEE run time by setting J2EE to YES
  • You do not set genProject to a valid JEE project, as when you generate into a directory instead

Before you paste entries from a JEE environment file into the deployment descriptor of an application client or EJB project, you need to change the order of entries in the file, as described in JEE environment file. You do not need to change the order of entries if you are working with a JEE web project.