This content has been marked as final.
Show 3 replies
-
1. Re: Injection at component instantiation time using annotations
pmuir Mar 31, 2008 5:28 PM (in response to jensaug.jens.augustsson.eu)
Jens Augustsson wrote on Mar 28, 2008 04:34 PM:
Hi,
Injection references at method invocation time is of course excellent, but I often also would like to inject references to Seam components, or some object from a Seam contexts, at component instantiation time.
Currently I do this programatically in my @Create method by using Components.getInstance() and Contexts.getSessionContext().
Is there any way to do this declaratively? Using annotations, not XML? Like @InAtInstantiation?
br,
JensNo.
Generally, it's not a good idea.
-
2. Re: Injection at component instantiation time using annotations
jensaug.jens.augustsson.eu Apr 2, 2008 11:39 AM (in response to jensaug.jens.augustsson.eu)Thanks for the response,
But Seam support XML based injection at instantiation time using components.xml, why not using Annotations?
I use it e.g for component configuration - is there any technical reason for why Seam should inject every reference at method invocation time or do you have other suggestions of how to handle configuration?
br,
Jens -
3. Re: Injection at component instantiation time using annotations
pmuir Apr 5, 2008 5:52 PM (in response to jensaug.jens.augustsson.eu)Yes, there are technical reasons, check the forum and source code for references to disinjection (it's because of the use of proxies).
I don't see how you can configure using annotations?