cameleon104
2008-04-08 14:03:23 UTC
Hi all,
To perform multiple type of injection, I use this code (I do not know if is
a good idea or not) :
MutablePicoContainer pico = new DefaultPicoContainer();
MutablePicoContainer inject = pico.as(Characteristics.METHOD_INJECTION);
MutablePicoContainer constructor = pico.as(Characteristics.CDI);
A problem appear when I try to use the 'as' method on 'inject' or
'constructor'
This code doesn't work
inject.as(Characteristics.CACHE).addComponent(VoteManager.class,
VoteManagerStd.class);
There are no call on the inject method
This code work
inject.as(Characteristics.METHOD_INJECTION,
Characteristics.CACHE).addComponent(VoteManager.class,
VoteManagerStd.class);
The call on inject method is made
Obviously, the 'Characteristics.METHOD_INJECTION' is lost on the second call
to 'as' method.
Is it normal ? Is it a bug ?
Thanks
To perform multiple type of injection, I use this code (I do not know if is
a good idea or not) :
MutablePicoContainer pico = new DefaultPicoContainer();
MutablePicoContainer inject = pico.as(Characteristics.METHOD_INJECTION);
MutablePicoContainer constructor = pico.as(Characteristics.CDI);
A problem appear when I try to use the 'as' method on 'inject' or
'constructor'
This code doesn't work
inject.as(Characteristics.CACHE).addComponent(VoteManager.class,
VoteManagerStd.class);
There are no call on the inject method
This code work
inject.as(Characteristics.METHOD_INJECTION,
Characteristics.CACHE).addComponent(VoteManager.class,
VoteManagerStd.class);
The call on inject method is made
Obviously, the 'Characteristics.METHOD_INJECTION' is lost on the second call
to 'as' method.
Is it normal ? Is it a bug ?
Thanks
--
View this message in context: http://www.nabble.com/call-to-%27as%27-method-erase-previous-Characteristics-tp16558740p16558740.html
Sent from the NanoContainer - PicoContainer - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
View this message in context: http://www.nabble.com/call-to-%27as%27-method-erase-previous-Characteristics-tp16558740p16558740.html
Sent from the NanoContainer - PicoContainer - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email