What is the need of Remote and Home interface. Why cant it be in one?

Alessandro A. Garbagnati

In a few words, I would say that the main reason is because there is a clear division of roles and responsabilities between the two interfaces.

The home interface is your way to communicate with the container, that is who is responsable of creating, locating even removing one or more beans.
The remote interface is your link to the bean, that will allow you to remotely access to all its methods and members.

As you can see there are two distinct elements (the container and the beans) and you need two different interfaces for accessing to both of them.

I would suggest you to take a look at this FAQ: What's the difference between EJBHome, EJB Home, EJB Object, EJBObject and EJB (not to mention Home Interface and Remote Interface)? and, maybe, spend some time in reading the EJB Specifications that are extremely clear and interesting.
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact