Scott M Stark writes:
> Here is some info pulled from the EJB 1.1 spec, Servlet 2.2 spec and
> J2EE 1.2 spec concerning deployment of ejb jars, web wars and app
> ears. In going through this info, what I get out of it is that the
> ejb-jars should be included in the application classpath, sinc in
> general, the ejb module can consist soley of the ejb-jar with all
> required classes included. Although there is support for factoring
> shared classes into separate jars, it is not required.
Perhaps we should also consider the upcoming specs. J2EE-1.3PRD throws
more light on this issue:
8.2 Assembling a J2EE-Application, 3. d.:
"Make sure that each component in the application properly describes
any dependencies it may have on other components in the application. A
J2EE application should not assume that all components in the
application will be available on the "classpath" of the application at
run time. Each component might be loaded into a separate class loader
with a separate namespace. If the classes in a JAR file depend on
classes in another JAR file, the first JAR file must reference the
second JAR file using the Class-Path mechanism."
For me the bottom line is, that if two J2EE modules need to share some
common classes, they have to make this explicit by declaring their
dependencies by the manifest Class-Path. The container should not try
to do some magic to find such dependencies automatically. On the other
hand, to conform the above spec the assembler has to do this anyway...
/Gabor
--
Gabor Herr [EMAIL PROTECTED]
Computer Science Department [EMAIL PROTECTED]
Darmstadt University of Technology
Germany