An EJB comprises a number of specific interfaces and implementation classes. Interfaces of an EJB are always exposed, you define a public interface and expose it. You can attach an interface or class to only one EJB at a time.
EJB component interfaces are shown as circles linked to the EJB component side by an horizontal or a vertical line:
Interfaces provide a remote view (Remote home interface Remote interface), or a local view (Local home interface Local interface).
Classes have no symbol in the component diagram, but the relationship between the class and the EJB component is visible from the Classes page of the EJB component property sheet, and from the Components tabbed page in the Dependencies page of the class property sheet.
The following table displays the stereotypes used to automatically identify EJB interfaces and classes:
Stereotype |
Describes |
---|---|
<<EJBRemoteHome>> |
The remote home interface |
<<EJBRemote>> |
The remote interface |
<<EJBLocalHome>> |
The local home interface |
<<EJBLocal>> |
The local interface |
<<EJBEntity>> |
The bean class of an entity bean |
<<EJBSession>> |
The bean class of a session bean |
<<EJBMessageDriven>> |
The bean class of a message driven bean |
<<EJBPrimaryKey>> |
The primary key class of an entity bean |
Template names are instantiated with respect to the corresponding component and assigned to the newly created objects. If an unattached interface or class, matching a given name and classifier type already exists in the model, it is automatically attached to the EJB.