Logical unit of work

When you change non-recoverable resources, that change is relatively permanent; neither your code nor EGL runtime services can rescind the changes without notice. When you change recoverable resources, such as databases, your code or EGL runtime services can either commit the changes to make them permanent or roll back the changes to return to content that was in effect the last time changes were committed.

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 the following events occurs:

EGL performs a single phase commit that calls each recoverable resource manager separately.

The following considerations apply to the interaction of EGL and non-EGL programs.

Compatibility

Table 1. Compatibility
Target Issue
Java
  • 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 do not update more than one database in a unit of work because only a one-phase commit is available.
JavaScript Access of files, databases, and queues is only indirect, by way of services.