Use extended transactions
- Last Updated: January 16, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
As described earlier, by default, each row modification (row update,
insertion, and deletion method) executes as a single transaction in the SmartDataObject. You
can extend a transaction to include multiple rows using Batch
mode, where a sendBatch() method applies a set of row updates
as a single transaction (see Use batch mode [extension]). You also can explicitly manage a larger transaction on the application server remotely,
using an automatic transaction.
An automatic transaction allows you to remotely create a larger transaction within which all SmartDataObject transactions become nested as subtransactions. Using an automatic transaction, the Open Client application can start, commit, and roll back a single transaction by executing methods on a special ProcObject defined in the same AppObject that provides access to the corresponding SmartDataObject. The persistent procedure underlying this ProcObject supports specific functionality and must be available for execution on the application server to make an automatic transaction possible. Such a transaction can encompass the entire life of the SDOResultSet.
reOpenQuery() after an explicit transaction
roll-back, to maintain a cache that is consistent with the database. The
reOpenQuery() method also can be desirable after committing a transaction
containing inserted rows, so these rows are visible within the ResultSet. For more
information, see Visibility of updates.