posted 17 years ago
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.
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD, SCEA/OCMJEA
Live life to an interface, not an implementation!