[jboss-dev-forums] [Design the new POJO MicroContainer] - Context ClassLoader - Deployers
adrian@jboss.org
do-not-reply at jboss.com
Tue Jan 22 09:32:16 EST 2008
This one is a bit more tricky as discussed before.
Currently, we don't set the context classloader when calling out to the deployers un/deploy.
The question is, what should the context classloader be?
There are two possible answers:
1) The deployment's classloader. i.e. DeploymentUnit.getClassLoader()
2) The deployer's classloader. i.e. the classloader of whoever registered the deployer
The osgi style classloading rules will likely make the deployer classes
invisible from the application classloader, unless it explicitly imports them or uses
the old importAll rules (which is still the default).
Also the deployment's classloader isn't available until the CLASSLOADER stage.
So I'd propose that (2) is the correct context classloader. The deployer can
itself set the context classloader to the deployment classloader when required.
e.g. The EJB deployer does this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122224#4122224
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122224
More information about the jboss-dev-forums
mailing list