• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Home Interface and Remote Interface

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A session bean contains
Home interface
Remote interface
Session bean Class
Deployment descripter
Home and Remote, they are interface , why they are not complete cleasses ??? Is that becaues thay are implemented by the container???
Please explain in detail
Thanks in advance~
Sarmad
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Home and remote are interfaces that are implemented by classes generated by the container. Its like this:
Home interface extends EJBHome and is implemented by a container generated class. An object of this class "home object" acts an object factory and creates an EJB object. Mind u, EJB object is different from EJB bean. This EJB object is a middle man b/w client and EJB bean. It delegates method calls to the bean.The home object has the create() method that corresponds to the ejbCreate() method of the bean.
Coming to remote interface : this interface extends EJBObject interface and enumerates business methods in the bean. This interface is implemented by another container generated class. An object of this container generated class is the "EJB Object" (the one i mentioned before).
The EJB bean is an instance of EJB class. If its session bean it implements the "Sessionbean" interface ,else "Entitybean" interface. This class has the ejbCreate(),ejbPassivate(),etc and most imp the business methods. The cleint never calls the methods in the bean directly. The methods are called either by the container or the EJB Object.
I think i have given a pretty exhaustive explanation. The best way to get more info is read, the "Mastering EJB" book by EdRooman. Its a free download from the site : "theserverside.com".
Guys on the ranch can correct me is i have missed something.
Rajesh
 
Sarmad Sindhi
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Rajesh , I have this book of Ed Roman. however these things were not very clear to me.
Thanks again
Sarmad
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic