-
-
2. Re: Weld setter injection of EJBs
meetoblivion May 29, 2013 9:26 AM (in response to jharting)Hmmm, serious sad face right now - http://www.youtube.com/watch?v=oabcM9SOF-E
Anyways, I've been pushing hard at work for creating testable code before writing an arquillian test (e.g. don't use the hammer as a crutch, but as a hammer). This breaks this.
Any chance that this can be back ported to the 1.1.x line? Even if I sent you the pull request?
-
3. Re: Weld setter injection of EJBs
jharting May 30, 2013 5:07 AM (in response to meetoblivion)This is planned to be fixed soon for Weld 2.0. PRs are welcome but note that implementing this requires changes to both Weld and AS7 / WildFly integration.
-
4. Re: Weld setter injection of EJBs
jaikiran May 30, 2013 6:10 AM (in response to jharting)Jozef Hartinger wrote:
PRs are welcome but note that implementing this requires changes to both Weld and AS7 / WildFly integration.
And as a further FYI to the original poster - WildFly is already on Weld 2.x series which means even if there was a 1.1.x fix for Weld it wouldn't be included in any of the released community AS7 versions (unless one patches it themselves).
By the way that JIRA doesn't have much details and I'm curious - isn't method level resouce injection tested in CDI TCK? If it is then I would have expected it to be noticed it early in AS7 integration.
Edited by Jaikiran - To clarify who the FYI was for
-
5. Re: Weld setter injection of EJBs
luksa May 30, 2013 6:25 AM (in response to jaikiran)Is setter injection with the use of @EJB (and not @Inject) even supposed to be supported? I can't find anything re this in the spec. It's clear that it is supported inside EJBs, but where does it say that it should be supported inside CDI beans?
-
6. Re: Weld setter injection of EJBs
jharting May 30, 2013 6:35 AM (in response to jaikiran)This requirement comes from the EE spec, not CDI spec. Unfortunatelly, the TCK does not test method-level resource injection into CDI beans.
-
7. Re: Weld setter injection of EJBs
jharting May 30, 2013 6:36 AM (in response to jharting)John, did you consider working around by:
a) using @Inject setter injection instead of @EJB?
b) turning the injected classes in EJBs where the setter injection is supported?
-
8. Re: Weld setter injection of EJBs
meetoblivion May 30, 2013 9:21 AM (in response to jharting)Essentially at this point, we're using field level injection w/ setters to help with the testability.
@jaikiran - yes, I would end up patching the local version of weld. We have to do that anyways, since right now our local builds are based on AS7.1.1 but we upgraded it to Weld 1.1.10