[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: KernelDeploymentDeployer and annotations in MDR
adrian@jboss.org
do-not-reply at jboss.com
Thu Dec 4 07:07:28 EST 2008
"scott.stark at jboss.org" wrote : "adrian at jboss.org" wrote :
| | The issue appears to be that for the plain deployment,
| | we don't necessarily have the classloader from which we can
| | create the annotations. e.g.
| |
| | | <deployment>
| | | <classloader><inject name="BeanConstructedLaterOrInThisFile"></classloader>
| | | <annotation>@from.that.Classloader</annotation>
| | | </deployment>
| | |
| |
| It could create a static MetaDataLoader if the class loader was not a bean or a bean that was available, otherwise how could a MetaDataLoader that was a bean be integrated into the deployment MetaData view?
|
|
Yes that would be one possiblity. i.e. we create an artifical bean
that is responsible for populating the annotations in the DEPLOYMENT scope.
The other beans in the deployment would have to depend on it at the
PRE_INSTALL stage so they can see the correct annotations.
But that might create a circular dependency where the classloader for the
deployment is a bean within the deployment. Normally we allow you
to workaround the issue by adding
<classloader><null/></classloader>
(e.g. the VFS classloader stuff used in the bootstrap xml does this implicitly)
to that bean so we could possibly use the same to indicate that it shouldn't
wait for the deployment level annotations to get set up.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194322#4194322
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194322
More information about the jboss-dev-forums
mailing list