A method and system are provided for storing multiple instances of a CMP
bean enrolled in a transaction by utilizing CMP batch operations to
update multiple entries in a database table in one SQL statement only,
thus avoiding multiple database roundtrips. The batch operation of CMP
beans can be enabled by specifying certain options in a DTD file. As part
of the batch operation feature, another option may be added to the DTD
file as well, enabling the container to delay all database operations in
a transaction until the commit time, automatically sort the database
dependency between the operations, and send these operations to the
database in a way to avoid any potential database constraint violations.