Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Contexts z/OS MVS Programming: Resource Recovery SA23-1395-00 |
||||||||||||||||
A context can be either:
Table 1 summarizes the differences between the two types of contexts.
Expressing Interest in a Context: A resource
manager expresses interest in a context to cause the system to invoke
the resource manager's exit routine when:
When a resource manager expresses interest in a context, the system provides a context token that represents the context. The context token is unique within an MVS™ system or sysplex but is not guaranteed to be unique across a network of MVS systems. Privately-Managed Contexts: When a resource manager that is processing transactions creates a new work request, the resource manager should create a new privately-managed context for the request. The resource manager can associate the context with the application's task that will run for the work request. If needed, the resource manager can disassociate the privately-managed context from a task and later reassociate it with the same task or another task. By changing the associations, the resource manager can have one task that runs for many work requests, many tasks that run in series for a single work request, or both. Note that a context cannot be associated at the same time with multiple tasks. When a task changes from processing for one work request to processing for another work request, the resource manager should switch the privately-managed contexts associated with the task. Current Context: Every task in the system has an associated context; thus, there is always a context for a given task. When a task is created, context services provides the original (native) context for the task. A call to the Begin_Context service creates a privately-managed context, and a call to the Switch_Context service changes the current context to the privately-managed context. The native context still exists, but is not current. If a later call to the Switch_Context service disassociates the privately-managed context, the native context again becomes the current context. If a privately-managed context associated with a task ends, the native context becomes the current context. If a task ends while there is a privately-managed context associated with it, the privately-managed context ends, followed immediately by the end of the task's native context. |
Copyright IBM Corporation 1990, 2014
|