Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

@EJB usage for remote EJB

 
Ravi Bansal
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3889
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Answered here.
 
Ravi Bansal
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul.

Based on your answer , I have posted some further queries on the same topic . Can you please have a look at it ?
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!