Java Reference
In-Depth Information
• The contents and Class-Path of any resource adaptor deployed with the EAR
WAR
Given the example EE server deployment in listing 13.2 , a WAR module must have access
to the following:
• The contents and Class-Path of any external resource adaptor
• The contents and Class-Path of each library in the /lib directory of the EAR
• The contents and Class-Path of each library in the /WEB-INF/lib directory of
the WAR
• The contents of the /WEB-INF/classes directory of the WAR
• The Class-Path of the WAR
• The contents and Class-Path of all EJB-JAR modules deployed with the EAR
,
• The contents and Class-Path of any resource adaptor deployed with the EAR
As you can see, the EE server class loader has a big job to do. With so many classes at so
many different levels, class version conflicts become inevitable. Understanding the visibil-
ity requirements and remembering the parent-first delegation model that class loaders use
to find classes will help you package your applications effectively. Next, let's take a look
at how to package session and message-driven beans.
13.3. Packaging session and message-driven beans
Before creating an EAR to deploy your application to the EE server, you must create the
modules the EAR will contain. Now that you understand class visibility between the dif-
ferent modules of your application, you're ready to look at how to package these modules
and get them ready for deployment. Specifically, we're going to look at how to package
session and message-driven beans. The Java EE specification allows session and message-
driven beans to be packaged in an EJB-JAR module or the WAR module. When packaged
Search WWH ::




Custom Search