Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Upgrade and Migration Guide

- Previous: Migrating Enterprise EJB Modules
- Next: Application Root Context and Access URL

## To Build an EAR File

##### Steps

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.

- Previous: Migrating Enterprise EJB Modules
- Next: Application Root Context and Access URL

- © 2010, Oracle Corporation and/or its affiliates