Partial operation for container managed persistence

For EJB 2.x container managed persistence (CMP) entity beans, use the partial operation as a persistence option to specify how you want to update the persistent attributes of the CMP bean to the database.

There are two values you can select for partial operation: NONE or UPDATE_ONLY. The default setting for partial operation is NONE, where all the persistent attributes of the CMP bean to the database are stored to the database, even though only a subset of the persistent attributes fields might have changed. The UPDATE_ONLY option for the partial operation, limits update to the database to only persistent attributes of the CMP bean that have been modified. The setter methods on the bean determines if the corresponding CMP attributes has been modified. The modification is not based on the actual value being changed. In other words, if the setter method is invoked but the old and new values remain the same, the CMP attribute is considered dirty.

You can specify the partial operation as a persistent option at the bean level in the access intent policy configured for the bean. For more details on how to specify the partial operations, see Adding bean-level access intent for entity beans 2.x.

Functional Benefits

The partial update (selecting the UPDATE_ONLY value for the partial operation) option is designed to have the following functional benefits:

Performance benefits

The partial update option is designed to have the following performance benefits:

Adverse affects to performance

Although partial update is designed to improve performance, it can adversely affect performance too. When considering to use partial update, also consider the following factors:

Restrictions


Feedback