Batch commands for container managed persistence

Note: This feature applies to WAS Version 5.0.2 and later only.

In JDBC 2.0 and later, PreparedStatement objects can maintain a list of commands that can be submitted together as a batch. Instead of multiple database round trips, there can be only one database round trip for all the batched persistence requests.

WAS Version 5.0.2 enables you to take advantage of this. You can turn this option on from the EJB CMP side. When you choose this option, the run time defers ejbStore, ejbCreate, ejbRemove or the equivalent database persistence requests (insert, update, or delete) until they are needed. This can be at the end of the transaction, or when a flush is needed for finders related to this EJB type. When the persistence operation finally occurs, run time accumulates the database requests and uses JDBC PreparedStatement batch operation to make a single JDBC call for multiple rows of the same operation.

For more information, see Set the run time for batched commands Go to Help documentation.

Note: This new feature cannot work for an EJB CMP bean that is mapped to more than one table. For example, when you map inherited enterprise beans as root-leaf to a database, the subclass enterprise beans are mapped to two tables.