This content has been marked as final.
Show 3 replies
-
1. Re: is mappedName needed to reference an EJB in JSF or not?
jaikiran Mar 9, 2009 9:02 AM (in response to anthon.r)"anthon.r" wrote:
JBoss 5.0.0.GA
Hi,
I'm exhausted searching for some enlightenment on whether the attribute "mappedName" in @EJB is needed or not in a JSF Managed Beans. Could please anyone enlighten me on this subject?
Emanuel's comment here suggests that it should work without the mappedName http://www.jboss.org/index.html?module=bb&op=viewtopic&t=143046.
If it's not working for you, please open a new thread with more details including logs in the AS5 forum http://www.jboss.org/index.html?module=bb&op=viewforum&f=287
My guess is, if @EJB is declared at the class level, the container tries to inject the session bean into java:/comp/env/audit JNDI name instead of injecting it to the field directly as opposed to @EJB that is declared at the field level. Did I get it right?
Correct. The EJB is made available in the java:comp/env namespace. -
2. Re: is mappedName needed to reference an EJB in JSF or not?
anthon.r Mar 9, 2009 12:10 PM (in response to anthon.r)Hi jaikiran,
Before I open a new thread, I need to know if @EJB should work even if the WAR is deployed separately outside the EAR which contains the EJBs referenced by the JSF Manage Beans.
@EJB seems to work now inside JSF Manage Beans as long as WAR is deployed together with the EJB in a single EAR deployment. Otherwise, I'm getting nasty exceptions.
Thanks -
3. Re: is mappedName needed to reference an EJB in JSF or not?
jaikiran Mar 10, 2009 9:11 AM (in response to anthon.r)"anthon.r" wrote:
Before I open a new thread, I need to know if @EJB should work even if the WAR is deployed separately outside the EAR which contains the EJBs referenced by the JSF Manage Beans.
It doesn't work in servlets either so i don't think it would work in JSF managed beans. There's a feature request for this https://jira.jboss.org/jira/browse/JBAS-6332