JBoss development,
A new message was posted in the thread "Deferring instance creation/injection to
CDI":
http://community.jboss.org/message/532599#532599
Author : Marius Bogoevici
Profile :
http://community.jboss.org/people/marius.bogoevici
Message:
--------------------------------------------------------------
Adding to Carlo's comment: I don't think that there's an overlap either - what
Andrew has proposed is essentially targeted towards allowing CDI to produce an instance
which is:
- constructed according to the CDI constructor (either the unique @Inject constructor, or
the default one). I wonder if we do need to pass a list of arguments at all, since
it's up to CDI to decide on the constructor to invoke and its parameters. Of course,
having the ability to pass arguments may be a benefit in other cases.
- injected according to CDI rules concerning the processing of @Inject
- decorated according to the CDI
I suppose that this leaves it to the container to:
- inject Java EE resources and fields (@Resource,@EJB references, etc)
- apply interceptors (for which we should stick with the current approach)
So, the approach of "let EJB3 do the EJB3 work, let CDI do the CDI work" should
work fine.
Now, I guess we could do the latter directly from within CDI but it would complicate the
lives of both CDI and EJB3.
The other thing that Carlo mentioned is interceptors - so here there would be two
possibilities, as discussed with Andrew on IRC:
- leave instance creation + injection to CDI
- provide a callback through the SPI (postInterceptorCreation) so that CDI can do the
injection.
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/532599#532599