|
Java™ by example!
|
|
|
Why does an EJB need 2 interfaces?
Because EJB is seen from two different points. Clients see remote part of EJB interface, that which is defined by the EJBObject interface. Here you define all methods clients should see and call ("business methods"). Additionally, the EJBHome interface defines ways for clients to create or find a particular EJB. The EJB server sees an EJB through the EnterpriseBean interface, or usually through a more specific EntityBean, MessageDrivenBean, SessionBean interfaces. They define methods to react on different events inside an EJB container, such as activation or death of a EJB.
Further Information
Author of answer:
Comments
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|