Abstract
This tip provides some general guidelines to consider when packaging an application for deployment.
Contents
Here are some basic rules to consider when packaging an enterprise application:
- The EJB JAR modules and Web WAR modules comprising an application should be packaged together in the same EAR module.
- When a Web module accesses an EJB module, you should not package the EJB interfaces and stubs in the WAR. Thanks to the classloading architecture, EJB stubs and interfaces are visible by default to WAR modules.
- Utility classes used by a single Web module should be placed within its WEB-INF/lib folder. This is what we have done for the struts.jar file used only by the WebbankWeb module.
- Utility classes used by multiple modules within an application should be placed at the root of the EAR file. This is what we have done for the webbankCommon.jar, which is used both by servlets and EJBs.
- Utility classes used by multiple applications can be placed on a directory referenced via a Shared Library definition.
Special Notices
This material has not been submitted to any formal IBM test and is published AS IS. It has not been the subject of rigorous review. IBM assumes no responsibility for its accuracy or completeness. The use of this information or the implementation of any of these techniques is a client responsibility and depends upon the client's ability to evaluate and integrate them into the client's operational environment.
