Sun Java System Application Server Enterprise Edition 8.2 Upgrade and Migration Guide

ProcedureTo Build an EAR File

  1. Package EJBs in one or more EJB modules.

  2. Package the components of the Web application in a Web module.

  3. Assemble the EJB modules and Web modules in an enterprise application module.

  4. Define the name of the enterprise application’s root context, which will determine the URL for accessing the application.

    The Application Server uses a newer class loader hierarchy than Application Server 6.x does. In the new scheme, for a given application, one class loader loads all EJB modules and another class loader loads Web modules. These two are related in a parent child hierarchy where the JAR module class loader is the parent module of the WAR module class loader. All classes loaded by the JAR class loader are available/accessible to the WAR module but the reverse is not true. If a certain class is required by the JAR file as well as the WAR file, then the class file must be packaged inside the JAR module only. If this guideline is not followed it can lead to class conflicts.