Logical unit of work

When you change resources that are categorized as non-recoverable (such as serial files on Windows® 2000), your work is relatively permanent; neither your code nor EGL runtime services can simply rescind the changes. When you change resources that are categorized as recoverable (such as relational databases), your code or EGL runtime services either can commit the changes to make the work permanent or can rollback the changes to return to content that was in effect when changes were last committed.

Recoverable resources are as follows:
A logical unit of work identifies input operations that are either committed or rolled back as a group. A unit of work begins when your code changes a recoverable resource; and ends when the first of these events occurs:

Unit of work for Java

In a Java™ run unit, the details are as follows:
  • When any of the Java programs ends with a hard error, the effect is equivalent to performing rollbacks, closing cursors, and releasing locks.
  • When the run unit ends successfully, EGL performs a commit, closes cursors, and releases locks.
  • You can use multiple connections to read from multiple databases, but you should update only one database in a unit of work because only a one-phase commit is available. For related information, see VGLib.connectionService.
  • When an EGL-generated program is accessed by way of an EGL-generated EJB session bean, transaction control may be affected by a transaction attribute (also called the container transaction type), which is in the deployment descriptor of the EJB session bean. The transaction attribute affects transaction control only when the linkage options part, callLink element, property remoteComType for the call is direct, as described in remoteComType in callLink element.

    The EJB session bean is generated with transaction attribute REQUIRED, but you can change the value at deployment time. For details on the implications of the transaction attribute, see your Java documentation.

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.