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?
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.
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
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?
This requirement comes from the EE spec, not CDI spec. Unfortunatelly, the TCK does not test method-level resource injection into CDI beans.
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?
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