[webbeans-issues] [JBoss JIRA] Commented: (WBRI-329) Move EJB injection to InjectionTarget
Ken Saks (JIRA)
jira-events at lists.jboss.org
Fri Aug 7 10:28:29 EDT 2009
[ https://jira.jboss.org/jira/browse/WBRI-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12479492#action_12479492 ]
Ken Saks commented on WBRI-329:
-------------------------------
The problem is that the InjectionPoint SPI is not a good fit for the EE container. In our case we already have all the EE-style injection info per class and our existing injection manager is based on just getting an instance and injecting it. We've already done a full annotation/.xml scan for all classes. Given that, it's very cumbersome to implement a special resolveXXX method for each ref type based on an InjectionPoint. It forces completely redundant matching to a given injectable based on a different set of metadata. Plus, that approach doesn't work for the case that injection is specified via .xml only.
It's not about the overhead of iterating through the annotated members, but rather the fact that the web beans impl has to have more intimate knowledge of the EE-related ones in the first place. It's a better separation of concerns to just inject the 299-related fields/methods and leave everything else to the EE container in one fell swoop. That way we also don't have to change the SPI just because a new kind of EE env dependency is added.
Not sure how implementing N different resolveXXX InjectionPoint methods would be easier on other EE container implementations. Ultimately any EE container has to be able to process all the EE-related environment metadata independently of web beans.
About the 299 inject spi, doesn't it have to result in EE-style injection? Any managed bean can have EE dependencies that need to be injected. A framework calling inject doesn't know about 299-style vs. EE-style. It just wants everything to be set up.
> Move EJB injection to InjectionTarget
> -------------------------------------
>
> Key: WBRI-329
> URL: https://jira.jboss.org/jira/browse/WBRI-329
> Project: Web Beans
> Issue Type: Bug
> Components: Enterprise Beans, Glassfish integration
> Environment: 1.0.0.PREVIEW2.SP2 in 7/30/09 GlassFish V3 workspace
> Reporter: Ken Saks
> Fix For: 1.0.0.CR1
>
>
> Currently we perform 299 style injection into EJBs via an interceptor, I would prefer to move this to use the InjectionTarget SPI.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the weld-issues
mailing list