• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to interpret LocalHome interface

 
Anthony Karta
Ranch Hand
Posts: 342
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is my understanding, correct me if I' wrong.

LocalHome interface is Invoked by EJB container to create localhome stub (who use this and why required??) and local stub with type LocalObject (contains business logic) to be used by the client such as jsp, servlet, etc.

thanks all
 
Lalit Nagalkar
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am not an expert in j2ee, I have just started learning it but i would like to tell you what i learnt till this time

the home interface, be it local or remote is used to invoke methods on the EJB without creating it and it also contains the DB acces methods, EJB creation methods and home methods that are common to all instances of EJB hence home methods can't access instance fields of EJB

on the other hand local and remote interfaces are used to invoke bussiness methods specific to an instance of EJB this can only be done after creating an EJB instance using ejbCreate...() in home method

and for local and remote interfaces; the clients in same jvm may use local interfaces to improve performance but just remote interfaces will also do the job with performance penalty.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic