Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

EJB Newbie

 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys! I'm a newbie in EJB, ive started learning the technology by reading the WROX book Professional Jave Server Programming J2EE edition and also planning to read the PDF book mastering EJB by ed roman....anyway i have some question...
what is the difference between a local remote interface and a remote interface?
what is the diff bet a home interface and a local home interface?
do you have some code snippets i can study and tinker with?
thanks guys! 'ope you can help me!
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the difference between a local remote interface and a remote interface?
I think you should use use local interface if the clients accessing the beans are in the same JVM.
With local interface clients in same JVM can nly access the bean. That way the calls to the bean do not have to use RMI and the performance are better.
Moreover, if a bean is a target of a container managed relationship it must have local interface.
Remote interface must extend EJBObject and Local should extend EJBLocalObject

what is the diff bet a home interface and a local home interface?
simillarly i think the local home interface is used when u have a local interface and want to access the client locally. So you make local interface + local home interface or remote interface + home interface
The home interface must extend EJBHome and local home should extend EJBLocalHome
Hope this helps
 
Paulo Aquino
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the reply naveet!
 
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

do you have some code snippets i can study and tinker with?


Here is some code that has local and remote beans.
http://www.rickhightower.com/ejbql1.zip
It is taken from this tutorial...
http://www.rickhightower.com/ejbcmpcmrtut.html
Here is an example of a local entity bean:


 
Rick Hightower
Author
Posts: 350
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
More related comment here....
https://coderanch.com/t/310309/EJB-JEE/java/EJB-EE-starter
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic