For Enterprise JavaBeans (EJB) 2.x CMP entity beans, you can use
the partial update feature to specify how you want to update the persistent
attributes of the CMP bean to the database. This feature is provided as a
bean-level persistence option, called PartialOperation, in the access
intent policy configured for the bean.
Procedure
- Start the Application Server Toolkit.
- Open the J2EE perspective to work with J2EE projects. Click Window
> Open Perspective > Other > J2EE.
- Open the Project Explorer view. Click Window > Show View > Project
Explorer.
- Open the EJB Deployment Descriptor. Click EJB Projects > project >
ejbModule > META-INF > ejb-jar.xml. The Deployment Descriptor
editor opens.
- In the Deployment Descriptor editor, select the Access tab.
The access page opens.
- In the Default Access Intent for Entities 2.x (Bean Level) section
of the access page, select the bean for which you want to set partial operation.
If an access intent has already been configured for this bean, click
on the Edit button to edit the access intent policy. Otherwise, click
on the Add button to add an access intent policy to the bean. This
opens the Add access intent window.
- Select the Persistence Option check box if it is not already
checked.
- Select the Partial Operation check box. Use the
drop-down list next to the Partial Operation check box to select your preference.
- NONE
- Partial update is turned off. All of the persistent attributes of the
CMP bean are stored to the database. This is the default value.
- UPDATE_ONLY
- Specifies that updates to the database occur only for the persistent attributes
of the CMP bean that are changed.
- Select Finish.