-
1. Re: Accessing a deployed EJB from a war in the same AS 7 instance
mp911de Feb 22, 2012 11:52 PM (in response to lholmquist)Hi Lucas,
first, your EJB should be remote (in case your WAR is not in your EAR) or put at least @Local to the interface. When the WAR is outside, the only reliable possibility is using InitialContext and skipping the auto injection (to get things running). After that you can give the annotations a try.
Best regards,
Mark
-
2. Re: Accessing a deployed EJB from a war in the same AS 7 instance
lholmquist Feb 23, 2012 9:08 AM (in response to mp911de)thanks. i'll give that a try. should i also be including a jboss-deployment-structure.xml in my war that depends on the ejb jar
-
3. Re: Accessing a deployed EJB from a war in the same AS 7 instance
mp911de Feb 23, 2012 9:13 AM (in response to lholmquist)Hi Lucas,
in an ideal world you would have a ejb-impl and a ejb-api artifact. The API artifact carries all model objects, exceptions and interfaces, which you can give to your clients, so you are not depending on the EJB implementation. I'd suggest to put the EJB dependencies to WEB-INF/lib of your WAR file
Best regards,
Mark