Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

EJB call

 
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...
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • 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.
 
author & internet detective
Posts: 40035
809
Eclipse IDE VI Editor Java
  • 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
 
Hug your destiny! And hug this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic