wood burning stoves 2.0*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes @EJB usage for remote EJB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "@EJB usage for remote EJB" Watch "@EJB usage for remote EJB" New topic
Author

@EJB usage for remote EJB

Ravi Bansal
Ranch Hand

Joined: Aug 18, 2008
Posts: 84
I have a question regarding the @EJB Usage

Is it possible to call inject an EJB using @EJB annotation , which is residing on different App Server than where Caller EJB is residing.

For example AppServer server1 has an EJB A
AppServer server2 has an EJB B

I want to inject B into EJB A using @EJB annotation (without using any look up logic) , where will I give the host name information for AppServer 2 ? I dont see any attribute in EJB which I can use to provide that.

is the only workaround to have Jndi.properties in class path of EJB A ?


SCJP 5.0 94%
OCE-EJBD 90%
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3255
    
    2
Answered here.


Enthuware - Best Mock Exams and Questions for Oracle/Sun Java Certifications
Quality Guaranteed - Pass or Full Refund!
Ravi Bansal
Ranch Hand

Joined: Aug 18, 2008
Posts: 84
Thanks Paul.

Based on your answer , I have posted some further queries on the same topic . Can you please have a look at it ?
 
wood burning stoves
 
subject: @EJB usage for remote EJB
 
Similar Threads
EJB 3 DI
@EJB giving NullPointerException
EJBs in WebSphere
@EJB annotation Injection
Access to entity manager in Session Bean