• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB Newbie

 
Paulo Aquino
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • 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!
 
navneet bhartia
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
thanks for the reply naveet!
 
Rick Hightower
Author
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • 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
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More related comment here....
http://www.coderanch.com/t/310309/EJB-JEE/java/EJB-EE-starter
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!