• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB call  RSS feed

 
Jithesh Kumar
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am new to ejb and i found that in ejb we are looking up the home interface then calling create method
and using the remote interface we are calling the bussiness method of the bean.

my doubt is this how a call to the bussiness method by the remote interface will invoke the implemented bussiness method in the bean
Is it right that it can be achieved only by having the remote interface variable refering to the beans instance...
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you are calling a business method via the remote interface, yuo are actually calling a method of a stub of the bean. Here is an article explaining this.
 
Jithesh Kumar
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i have one more doubt..why we have remote and home interface in ejb?.
When we are using jsp servlet and ejb,can we use local interface and local home as all of them will be in the same server
i meant servlet ,jsp and ejb files all will be in the same server right..correct me if i am wrong.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37181
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using a local interface, then yes. Remote interfaces existing first and presumably local interfaces sere defined to parallel the API.
 
Jithesh Kumar
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it right to say that if we are using different servers like tomcat and jboss for an application then we need remote interface to communicate.
and if we are using jboss server alone then we need local interface.

Is it right?
 
Jithesh Kumar
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think i have found out the answer. we should look at the war, ear and jar file to find out the correct interface.
Thanks to all
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!