-
1. Re: @EJB injection not working on managed beans but in Servlets
wdfink Sep 13, 2012 4:06 AM (in response to dajo20034)How your archive structure look like?
Do you have a beans.xml?
How your code look like?
-
2. Re: @EJB injection not working on managed beans but in Servlets
jaikiran Sep 17, 2012 2:51 AM (in response to dajo20034)There's this bug which says it's applicable for JSF 1.2 https://issues.jboss.org/browse/AS7-5564. You however say, you are using JSF 2.0. So I'm not sure if you are running into the same issue. If it's reproducible can you attach a simple application here?
-
3. Re: @EJB injection not working on managed beans but in Servlets
ssilvert Sep 17, 2012 7:52 AM (in response to dajo20034)I have a test for this and it works fine. Are you bundling JSF with your WAR?
I'm attaching my test war. Just deploy it and go to:
http://localhost:8080/InjectionTest/index.jsf
Stan
-
InjectionTest.war 7.2 KB
-
-
4. Re: @EJB injection not working on managed beans but in Servlets
dajo20034 Sep 17, 2012 5:50 PM (in response to dajo20034)Thx to all you guys for your quick responses.
I found this tag in my web.xml
<context-param>
<param-name>com.sun.faces.injectionProvider</param-name>
<param-value>
com.sun.faces.vendor.WebContainerInjectionProvider
</param-value>
</context-param>
I removed it and everything is working fine now
It worked on jboss 6.1 but not on jboss 7.1.1. NOW IT WORKS