*
The moose likes EJB and other Java EE Technologies and the fly likes why two interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "why two interfaces" Watch "why two interfaces" New topic
Author

why two interfaces

james edwin
Ranch Hand

Joined: Nov 22, 2001
Posts: 393
Hi,
Just wanted some clarifications here,WHY we have two separate interfaces,one for remote and home.Why don't sun made only ONE interface.
Is it because one manages life cycles and other manages bussiness methods?But I think there must some other reason for this....
Can some one put more light on this ?
James


Regards,
James
stara szkapa
Ranch Hand

Joined: Mar 27, 2003
Posts: 321
This is how I understand it so far
Home Interface is sort of like EJB Factory
Remote Interface is sort of like EJB Proxy
At least conceptually
there is one factory for many EJB (1:M)
there is one proxy for each EJB (1:1 relationship)
Since factory and proxy have such different functionality, it would be awkward to have them implemented in one class.
aadhi agathi
Ranch Hand

Joined: Apr 29, 2002
Posts: 263
Originally posted by james edwin:
Hi,
Just wanted some clarifications here,WHY we have two separate interfaces,one for remote and home.Why don't sun made only ONE interface.

EJBHome can hold any number of EJBObjects. Means, the same remote object can be deployed under different homes. this aids in the distribution of objects. look at Home like an IP address.


Aadhi
 
 
subject: why two interfaces
 
Similar Threads
Apache and Tomcat questions
Does Interface avoid Multiple Inheritance problems?
about Home & Remote Interface
Different interfaces in EJB 3.0
Abstract / Interface / Inheritance