This content has been marked as final.
Show 2 replies
-
1. Re: Resolution should not happen via injection container-jboss 5 for ejb3
jaikiran Jun 11, 2010 8:44 AM (in response to shalini_cool)Are you injecting an EJB in a servlet? How exactly is your application packaged? Is the servlet war and EJB jar packaged in a single .ear?
-
2. Resolution should not happen via injection container-jboss 5 for ejb3
akshaysahu Apr 22, 2011 2:11 AM (in response to jaikiran)Readers,
Please follow the below steps to overcome the exception.
1. Deploy your ejb-jar and war file via an EAR file. I mean, do not deploy your ejb-jar and war file as separate entities. Package them as an EAR file and then deploy it.
2. During injection at the servlet, when you're using the @EJB annotation, just use the mappedName attribute of it. The mappedName attribute should contain the JNDI name of the EJB.
Thank You,
Akshay Sahu (OCBCD 5)