A
run unit is
a set of programs that are related by local calls or (in some cases) by transfers.
Each run unit has these characteristics:
- The programs operate together as a group. When a hard error occurs but
is not handled, all the programs in the run unit are removed from memory.
- The programs share the same runtime properties. The same databases and
files are available throughout the run unit, for example, and when you invoke
sysLib.connect or VGLib.connectionService to connect to a database dynamically,
the connection is present in any program that receives control in the same
run unit.
The Java run unit is composed
of programs that run in a single thread. A new run unit can start with a main
program, as when the user invokes the program. A transfer statement
also invokes a main program but continues the same run unit.
In the following cases, a called program is the initial
program of a run unit:
- The call is a call from an EJB session bean; or
- The call is a remote call, except that the same run unit continues in
the following case--
- The called program is generated by EGL or VisualAge® Generator; and
- No TCP/IP listener is involved in the call.
All programs in a Java™ run unit are affected by the same Java runtime
properties.