Reverse Engineering EJB Deployment Descriptor

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:


<entity> Example

The Entity Bean EJB type is further described as an example in this section.

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)

For each persistent attribute, a cmp-field is generated. The <cmp-field-name> contains the attribute code.

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.

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}

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

<relationships> Example

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.

The following table maps elements to the following properties:

Element

Property

<ejb-relation-name>

Association code

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)

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

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


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com