"kabir.khan(a)jboss.com" wrote : Following our Skype chat I have had a quick look
at Supply/Demand and how to support qualifiers. We could do something like:
|
| *As you mentioned add a enum type to Supply/DemandMetaData so we can see which
supplies/demands are qualifiers.
|
| *SearchClassContextDependencyItem is used when injecting BY_CLASS. This could be
expanded to take qualifiers into account when searching for the bean to inject. Maybe
rather than expanding SearchClassContextDependencyItem.resolve() and
AbstractInjectionValueMetaData.getValue(), we should add another method to
AbstractKernelController to take qualifiers into account?
| -Initially the Demands/qualifiers will be for the whole bean (coarse-grained), but
should somehow (I've not looked how yet) be expanded so we can qualify a particular
injection point (fine-grained).
| -For the coarse-grained model, what do we do if the following bean has the demand
qualifier @Test
|
| | class Bean
| | {
| | @Inject Something field;
| | }
| |
| And there is a bean in the controller of type Something, but it does not supply @Test?
I think coarse-grained needs to work slightly differently from fine-grained. Fine-grained
needs a bean with all the qualifiers specified at the injection point. Coarse-grained
needs a bean with as many as possible of the qualifiers specified at bean level.
|
| When looking into this, I noticed that AbstractInjectionValueMetaData takes the
LookupStrategy into account when searching for the context, while the
SearchClassContextDependencyItem does not appear to do so.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266113#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...