[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: ClassLoader injection Scope issue
adrian@jboss.org
do-not-reply at jboss.com
Tue Oct 28 12:22:10 EDT 2008
"adrian at jboss.org" wrote :
| But there's probably a reason why I didn't do that in the first place
| (other than I just forgot to do it? - which might actually be the real reason. :-)
I think the reason why I didn't do it, is because it doesn't really work.
To get close, DeploymentContext.getScope() would need a similar HACK to what is in
KernelScopeInfo. i.e. use the deployment's classloader to convert the class name
to a class in the CLASS scope level.
But your example shows that the component/deployment's classloader
isn't necessarily the correct classloader to do that.
In fact, the correct classloader doesn't even exist yet.
You do know whether you can use the deployment classloader
bean.getClassLoader() == null
but that doesn't help when it is not null. ;-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185157#4185157
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185157
More information about the jboss-dev-forums
mailing list