Chapter 14 Working with Java
EJB components are defined inside the <enterprise-beans> element. Associations between bean classes are described inside the <relationships> element, in addition, EJB types are defined inside the following elements:
The Entity Bean EJB type is further described as an example in this section.
Attributes
The following table maps elements to the following properties:
Element | Property |
---|---|
<description> | Component comment |
<display-name> | Component name |
<ejb-name> | Component code |
<home> | Remote Home Interface code |
<remote> | Remote Interface code |
<local-home | Local Home Interface code |
<local> | Local Interface code |
<ejb-class> | Bean class code |
<persistence-type> | 'Container' for CMP and 'Bean' for BMP |
<prim-key-class> | Primary key class code |
<reentrant> | Component extended attribute (reentrant=true/false) |
<cmp-version> | Component extended attribute (cmpVersion) |
<cmp-field>
For each persistent attribute, a cmp-field is generated. The <cmp-field-name> contains the attribute code.
<primkey-field>
If the primary key consists in only one attribute whose data type is one of the java.lang, the primary key class may be empty. In this case, a <primkey-field> containing the primary key attribute code is generated.
<ejb-ref>
The <ejb-ref> is used for declaration of a reference to an enterprise bean home. It is generated when a dependency with <<ejb-ref>> stereotype is linked to the referenced bean in a different package.
ejb-ref element | Result in the component diagram |
---|---|
<ejb-ref-name> | EJB/{Referenced EJB code} |
<ejb-ref-type> | Entity or Session bean |
<home> | Referenced EJB Home Interface code |
<remote> | Referenced EJB Remote Interface code |
<ejb-link> | {Qualified Referenced EJB Jar name}#{Referenced EJB code} |
<ejb-local-ref>
The <ejb-local-ref> is used for declaration of a reference to an enterprise bean local home. It is generated when a dependency with <<ejb-ref>> stereotype is linked to the referenced bean in a different package.
ejb-ref element | Result in the component diagram |
---|---|
<ejb-ref-name> | EJB/{Referenced EJB code} |
<ejb-ref-type> | Entity or Session bean |
<local-home> | Referenced EJB Local Home Interface code |
<local> | Referenced EJB Local Interface code |
<ejb-link> | Referenced EJB code |
Associations between bean classes are further described as an example in this section.
Inside the <relationships> element, each <ejb-relation> defines one association between two bean classes.
Attributes
The following table maps elements to the following properties:
Element | Property |
---|---|
<ejb-relation-name> | Association code |
<ejb-relationship-role>
Each association end is defined in an <ejb-relationship-role> element.
ejb-ref element | Result in the component diagram |
---|---|
<ejb-relationship-role-name> | Role name |
<multiplicity> | Role multiplicity (One or Many) |
<cascade-delete> | Association EXA (roleACMRCascadeDelete or roleBCMRCascadeDelete) |
<relationship-role-source>
This element specifies the EJB whose bean class is associated with the current relationship role.
ejb-ref element | Result in the component diagram |
---|---|
<ejb-name> | EJB code |
<cmr-field>
In a navigable role, the migrated attribute is generated as a <cmr-field>.
ejb-ref element | Result in the component diagram |
---|---|
<cmr-field-name> | Migrated attribute code |
Copyright (C) 2005. Sybase Inc. All rights reserved. |