esuslogo
 [To advertise Java(tm) Events here, contact joris@esus.com!]
banner

Java™
by example!






New @ Esus.com


  gb  In-house search engine for better results!

  gb  Get updates with the esus.com
newsletter!









  Home 
 Browse Categories 
 Ask a Java Question 
 Help 
  For Java Tips & Tricks, subscribe to the esus.com newsletter!
Search Java Q&A, Links, API's:   adv 

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!





Terms of Service | Privacy Policy | Contact

Copyright © 2000-2003 Esus.com - All Rights Reserved 
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. Esus.com is independent of Sun Microsystems, Inc. All other trademarks are the sole property of their respective owners.