I'm trying to figure out how to fix the VFSClassLoaderScopingPolicy
with the new rules for WAR classloading deployments.
The way it works now is that when a war gets deployed, there's a seperate
deployer that decides whether WARs (subdeployments) should be scoped.
They are by default.
If this is the case, then the war subdeployment will have its own Module
and its own Domain.
You shouldn't need any hacks anymore for "isWar" or "isWebCL"
or looking at the top level classloader. All you need to know is whether
Module.determineDomain() is not the default domain (therefore it is scoped)
and Module.determineParentDomain() to know what it is scoped against.
Of course most subdeployments other than wars will use the top level
classloader of the whole deployment.
I was trying to figure out what needs changing, but I got lost. :-)
One thing I did find is this code in JBoss5ClassPoolFactory
//It is scoped ClassLoaderSystem sys = ClassLoaderSystem.getInstance(); ClassLoaderDomain domain = sys.getDomain(module.getDeterminedDomainName()); boolean parentFirst = module.isJ2seClassLoadingCompliance();