[jboss-as7-dev] EAR Classloading documentation seems to be in contradiction.
Vimal Kansal
vkansal at redhat.com
Tue Jul 19 00:41:35 EDT 2011
Hi,
It appears that EAR classloading documentation at
https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7 is in
contradiction with what "jboss-ee.xsd describes :
AS7 Doc version
==============
<subsystem xmlns="urn:jboss:domain:ee:1.0" >
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
</subsystem>
By default this is set to true, which means that sub deployments will be
able to see other non-war sub-deployments classes by default (i.e. a war
deployment's module will have a dependency on all other ejb-jar
sub-deployments, however it will not have a module dependency on any
other war deployments).
If this is set to false then no automatic dependencies are set up, they
must be setup manually with Class-Path entries, or by setting up
explicit module dependencies. This means that WARs (and other EJB jars)
do not have access to classes defined in an EJB jar unless an explicit
dependency is defined. The Java EE specification says that portable
applications should not rely on sub deployments having access to other
sub deployments that they do not have a Class-Path entry on, so portable
applications should always use Class-Path entry's to explicitly state
their dependencies.
jboss-ee.xsd version
==================
Flag indicating whether each of the subdeployments within a .ear can
access classes belonging to
another subdeployment within the same .ear. Setting
this to false, allows the subdeployments to
see classes belonging to other subdeployments
within the .ear.
For example:
myapp.ear
|
|--- web.war
|
|--- ejb1.jar
|
|--- ejb2.jar
If the ear-subdeployments-isolated is set to false,
then the classes in web.war can access classes
belonging to ejb1.jar and ejb2.jar. Similarly,
classes from ejb1.jar can access classes from ejb2.jar
(and vice-versa).
*Note that this flag, has no effect on the isolated
classloader of the .war file(s). i.e. irrespective
of whether this flag is set to true or false, the
.war within a .ear will have a isolated classloader
and other subdeployments within that .ear will not
be able to access classes from that .war. This is
as per spec*
Thx
Vimal
More information about the jboss-as7-dev
mailing list