[
https://issues.jboss.org/browse/AS7-5564?page=com.atlassian.jira.plugin.s...
]
Stan Silvert updated AS7-5564:
------------------------------
Git Pull Request:
https://github.com/jbossas/jboss-as/pull/3059 (was:
https://github.com/jbossas/jboss-as/pull/3059)
Workaround Description:
There are two workarounds. First, you can still get a reference to your EJB via JNDI:
SimpleEJB ejbFromJNDI = (SimpleEJB)new
InitialContext().lookup("java:module/SimpleEJB");
Or, you can change the classloading behavior in the web subsystem. If you do this then
JSF 2.x won't work, but JSF 1.2 will work.
Edit <jboss_home>/modules/org/jboss/as/web/main/module.xml
Under the dependencies section, change
<module name="com.sun.jsf-impl"/>
to
<module name="com.sun.jsf-impl" slot="1.2"/>
That will cause the web subsystem to link to the 1.2 version of the InjectionProvider and
@EJB will work.
Forum Reference:
https://community.jboss.org/message/760807#760807
@EJB doesn't work for JSF 1.2
-----------------------------
Key: AS7-5564
URL:
https://issues.jboss.org/browse/AS7-5564
Project: Application Server 7
Issue Type: Bug
Components: JSF
Affects Versions: 7.1.2.Final (EAP)
Reporter: Stan Silvert
Assignee: Stan Silvert
Fix For: 7.2.0.Alpha1
If you use the JSF 1.2 implementation that ships with AS, then if you use @EJB with JSF
managed beans then the EJB will not be injected. As a workaround you can get a reference
via JNDI.
For the fix, we need to break out the injection classes into a separate module. This
way, we can make the JSFInjectionProvider link to the interface in the proper JSF impl.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira