File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes DI with beans from an ejb-jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "DI with beans from an ejb-jar" Watch "DI with beans from an ejb-jar" New topic

DI with beans from an ejb-jar

Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 918


I was wonder if is possible to inject a bean which is placed in a(other) ear-jar in the root of my ear file ?


lalit upadheyay
Ranch Hand

Joined: Jun 20, 2005
Posts: 110
Yes, Its possible. I have succesfully created an ear containing ejb-jar file and injecting the remote biz interface in a servlet packaged in a war file. Both ejb-jar(.jar) and the .war file reside in same .ear file. The webapp lib should have the ejb-jar in it for ejb injection to work succesfully.

SCJP1.4, SCWCD1.4, SCBCD5.0(working on...)
I agree. Here's the link:
subject: DI with beans from an ejb-jar
It's not a secret anymore!