Adding fields to CMP entity beans

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.
Related concepts
Class diagrams
Related tasks
Editing fields of CMP entity beans
Adding fields to CMP primary key fields
Removing fields from CMP primary key fields
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.