Adding fields to CMP entity beans

In UML visualization, you can add fields to container-managed persistence (CMP) entity beans and define them as key fields.

To add a field to a CMP entity bean:

  1. In the diagram editor, right-click a CMP entity bean; then click Add EJB > CMP Fields.

  2. In the CMP Fields wizard, click Add.

  3. In the CMP Attributes window, specify a name and a type for the CMP field, specify its array dimension or define it as a key field, and click Apply.

  4. Click Finish.

Tip: You can also use the action bars in the diagram editor or the EJB Deployment Descriptor to add fields to CMP entity beans.

 

Parent topic

Designing CMP entity beans

 

Related tasks

Adding session bean facades to CMP entity beans
Editing CMP fields
Adding fields to CMP primary key fields
Removing fields from CMP primary key fields
Adding finder methods to CMP 1.x entity beans
Adding queries to CMP 2.x entity beans
Adding client views to CMP entity beans
Removing client views from CMP entity beans