This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

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
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 .

    Bookmark Topic Watch Topic
  • New Topic