[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Bean instantiate order with contextual injection
adrian@jboss.org
do-not-reply at jboss.com
Tue Aug 15 08:11:07 EDT 2006
"alesj" wrote : Is there a view of all possible usage?
|
You mean besides the xsd? :-)
anonymous wrote :
| So that I know where and how to look for useful injection information in this MetaData stack.
I don't know how you would define something abstract.
The information you want comes from the BeanInfo
not the MetaData. The MetaData is just the key.
e.g. className + property name -> getBeanInfo(className).getProperty(name).getType();
It is even more complicated for parameters since then you
have to iterate to constructors and do a "fuzzy match"
to try to guess which constructor they mean.
The current logic is in the Configurator for matching joinpoints.
My guess would be that you would need to:
1) Implement the revisit() of the meta data such that
you have the metadata context after the BeanInfo has been
determined. a simple way to be to add a visitDescribed() path.
2) The ADVMD then asks its parent on the stack getClass();
which will for a property
3a) Do context.getBeanInfo().getProperty(myName) and return the type
for a parameter
4a) Ask the constructor/beanMetaData to guess which constructor
will be used from the BeanInfo.getConstructors() and then
determine the class from this.
The factory and create/.../destroy/install will be the same as the
constructor except at least for the factory/install they will have
to retrieve the bean info for a different type.
Again all this code is in the Configurator in terms of resolving/guessing
the specific info.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965238#3965238
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965238
More information about the jboss-dev-forums
mailing list