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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...