Try OpenEdge Now
skip to main content
Java Open Clients
Using SmartDataObjects from Java Clients : Working with SDOResultSet objects : Updating SDOResultSet objects : Using extended transactions
Using extended transactions
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 Using batch mode [extension]). You also can explicitly manage a larger transaction on the AppServer 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 AppServer to make an automatic transaction possible. Such a transaction can encompass the entire life of the SDOResultSet. For more information on automatic transactions, see OpenEdge Application Server: Developing AppServer Applications.
Note: You should call 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.