[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Bean instantiate order with contextual injection
adrian@jboss.org
do-not-reply at jboss.com
Mon Aug 14 11:58:42 EDT 2006
"alesj" wrote : anonymous wrote :
| | 1) Contextual injection - i.e. determining (and properly dependening on)
| | the injected context based on class rather than name.
| |
|
| How to get property class to add 'demand' dependency item in AbstractInjectionMD - AbstractPropertyMD doesn't hold any class type value - obviously, since no owner bean class inspection is done?
|
Ok. Your problem is that the class is not available until the
DescribeAction. That is when the classloader dependency is
resolved. Until that point we can't guarantee the classloader even
exists.
So you're going to need a "placeholder" DependencyItem
where you fill in the type of the property once the BeanInfo
is resolved in DescribeAction.
This is a bit messy, and would probably be better implemented
as a "revisit" of the visitor where the extra visit does extra work
once the BeanInfo is resolved, but that is a lot more work
(in terms of making the old understand it rather than doing work twice).
For now, I would just do context.getDependencyInfo(),
iterate and update the "placeholder"s.
anonymous wrote :
| anonymous wrote :
| | 2) Creating BeanMetaData from annotations rather than xml.
| |
|
| Adding this in AbstractBeanMetaData.visit() through KernelConfigurer?
See above. And see where annotations and their dependencies
from AOP are resolved in the DescribeAction.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965028#3965028
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965028
More information about the jboss-dev-forums
mailing list