Chapter 3 Creating J2EE Applications for Sybase EAServer


Verifying EAServer Configuration Descriptor

The EJB deployment descriptor defines commonly used EJB properties. However, this is not enough for most application servers. For example, the EJB deployment descriptor does not contain the O/R mapping. To address this problem, each application server has its own deployment descriptor or configuration descriptor for additional information.

Sybase EAServer uses a Configuration Descriptor. It is an XML file named sybase-easerver-config.xml. It can be used to define all the property values of each component in EAServer.

The Configuration Descriptor can be added in the EJB JAR file. When you deploy an EJB JAR file into EAServer, all the properties will be set including O/R mapping. You can also use the jagtool command to configure EJBs with the Configuration Descriptor.

Before generating EJBs for EAServer, you can preview the Configuration Descriptor to verify that it is properly defined.

Steps To preview the configuration descriptor:

  1. Open the properties of the package that contains the EJBs.
  2. Click on the Preview tab.

In the Preview tab, the first tab shows the EJB Deployment Descriptor:


The second tab shows the Sybase EAServer Configuration Descriptor:


To change the Configuration Descriptor, you can change the O/R mapping definition or the extended attributes.

You can also generate a jagant script (build.xml) to configure the properties of EJBs. The jagant script is not necessary if you use the Configuration Descriptor.

Steps To generate the jagant script:

  1. Open the model or package property sheet.
  2. Click on the Preview tab.
  3. Click on the Change Generation Options button.
  4. Set the value of the "Generate jagant script to configure EJBs" option to true:
  5. The Preview tab displays a new tab called EAServer.Jagant Script:

 


Copyright (C) 2005. Sybase Inc. All rights reserved.