Ok, I finally got a handle on the IllegalAccessError that has been reported for a
while now and have a trivial testcase that demonstrates the problem. See the
bug details here:

[ 644289 ] ClassLoader issue with protected access and manifest refs
http://sourceforge.net/tracker/index.php?func=detail&aid=644289&group_id=22866&atid=376685

The real problem is the use of a UCL per jar for deployments. Because the java 
URLClassLoader
keeps track of the Class-Path reference in the jar it owns, when more than one jar 
references
a common jar the UCLs associated with the referencing jars are candidates for the 
defining
class loader for the classes in the common jar. Effectively this means that the common 
jar classes
are deployed multiple times even though only a single instance of a given class is 
created due to
the ULR caching.

I think the simplest fix is to introduce a common class loader associated with the 
parent deployment
that contains the union of all jars contained in the deployment. In addition to 
solving this problem
it also helps with issues of duplicates classes in a deployment since with a single 
class loader
an ordering of the jars can be specified.

I'm working on this issue in main and will backport fixes to 3.2 and 3.0

xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx



-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to