-
1. Re: Injecting into JSF Phase Listeners with JSF 2.2
tremes May 16, 2016 2:04 AM (in response to psirax)Hi Eric,
Yes I think this should work (when reading table "TABLE 5-3 JSF Artifacts Eligible for Injection" in JSF specification). Do you have some reproducer please? Did you try to inject with CDI by using @Inject?
-
2. Re: Injecting into JSF Phase Listeners with JSF 2.2
nickarls May 16, 2016 2:39 AM (in response to psirax)And the instantiation is normal (done by the JSF implementation)? One would think deployment would fail if the injection fails but since it's working on GF, it sounds a bit strange. And you have checked all imports that they are the normal java/javax ones for all the usual suspects?
-
3. Re: Injecting into JSF Phase Listeners with JSF 2.2
tremes May 17, 2016 3:01 AM (in response to nickarls)I created [WFLY-6617] Cannot inject session bean with @EJB to JSF PhaseListener - JBoss Issue Tracker Note that CDI inejction with @Inject works in this case.
-
4. Re: Injecting into JSF Phase Listeners with JSF 2.2
psirax May 17, 2016 11:53 AM (in response to psirax)Tomas,
I was able to run my project with the @Inject annotation, thank you! Just for further information, while I was trying to discover the root cause of this issue, I ran my test code on Wildfly 9.0.2.Final as well as Wildfly 8.2.1.Final and had the same issues with the @EJB annotation in the JSF listener.
Nicklas,
Correct, the servers I used were downloaded and unzipped exactly as they come from the wildfly.org/downloads page. The test project to isolate this issue was created in Eclipse Neon for Java EE Developers. It was a basic Dynamic Web Project targeted to run a basic Facelets app that really does nothing but invoke the JSF PhaseListener and try to inject a dummy EJB into it. No new Jars were introducted, all the standard Java EE 7 jars are available.