Partial column update feature for container managed persistence

Previously, the WebSphere Application Server implementation of the Container Managed Persistence (CMP) bean method ejbStore stored all of the persistent attributes of the CMP bean to the database, even if only a subset of persistent attribute fields were changed. This needless performance degradation is eliminated in this release of the product.
Note: Entity beans are not supported in EJB 3.0 modules.
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. PartialOperation has two possible values:
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.
For information on how to set partial update, see Setting partial update for container-managed persistent beans.

Performance

Performing partial updates increases performance in several ways:
Although partial update improves performancel, it can adversely affect performance as follows:

Considerations for using partial update

The performance gains you hope to achieve should be weighed against the possible instances where degradation can occur. You can use the following guidelines to help you make the decision.

Restrictions

By default, batch update of update queries is disabled for all CMP beans for which partial update is enabled. In other words, partial update takes precedence over batch update. Batch update of delete and insert queries is not affected.

Batch update performance is affected when both batch update and partial update persistence options are used on the same bean, because each partial query is different. You can use the JVM property, -Dcom.ibm.ws.pm.grouppartialupdate=true, to group the similar partial update queries into a batch update. Grouping partial updates only helps when there are several partial queries with the same shape in a transaction. Otherwise, grouping partial updates has the opposite affect on performance. Because this setting is not on a bean level basis, you should be careful when turning it on. Because this affects all beans that have both partial update and batch update on, you must make sure that batch update of partial queries does increase performance when viewed across all the beans for which both updates are on.

To set the JVM property:
1. Open the server.xml file.
2. Change the value of -Dcom.ibm.ws.pm.grouppartialupdate=true to 
                       -Dcom.ibm.ws.pm.grouppartialupdate=false.



Related tasks
Setting partial update for container-managed persistent beans
Using access intent policies for EJB 2.x entity beans
Concept topic Concept topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Jun 11, 2013 8:40:09 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=v701sca&product=was-nd-mp&topic=cejb_partupd
File name: cejb_partupd.html