• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ejb home vs ejb object

 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can anybody tell me difference between ejb home and ejb object
thanks
 
Ranch Hand
Posts: 528
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rehans,
The difference is quite big, and once you fully understand EJB and RMI, it's quite logical.
The EJB object (also know as the component interface) is where your business methods are found. As a bean provider, you must create an interface which extends EJBObject (or EJBLocalObject). Its in this interface where you will DECLARE your business logic methods. At deploy time, the container will implement this interface for your creating the stubs (assuming we're talking remote). In your bean object, although you will NOT implement this iterface, you will define the methods declared in ejb object.

Now, normally your clients will want to invoke one of the business methods which you declared in your ejb object interface and defined in your bean class. But how does your client gain access to the component interface (your ejb object)? Through your home object. A JNDI lookup is needed to get your home.

To explain all this properly with detail, for each bean type, i would be here for ever.

I recommend you pick up a copy of Head First EJB .

Regards,
Mars.
 
reply
    Bookmark Topic Watch Topic
  • New Topic