MqContextC - protect and restore the service-environment … More...
Functions | |
static OT_ProcRet | atlmqmsgque_MqContextC_EnvProtect (MqContextC_ARGS) |
Atl: → C-API protect the service-environment | |
static OT_ProcRet | atlmqmsgque_MqContextC_EnvRestore (MqContextC_ARGS) |
Atl: → C-API restore the service-environment | |
MqContextC - protect and restore the service-environment …
The "Env" style functions are used to secure the service-environment (defined in MqEnvS)
and is required.. under special conditions... to proper answer the original service call at the
end of the service-processing.
By default atlmqmsgque guarantee the proper management of the environment on behalf of the user.
Under normal conditions the user don't need these functions.
The folllowing design-goals were defined:
come-in == come-out
The two design-goals from above are in conflict and the both functions MqEnvProtect and MqEnvRestore are used to solve this conflict.
Example from server.atl
→ protect the environment and import from database
# PROTECT the original service-call EnvProtect $myNs # OVERWRITE the original service-call with data from the database MqDumpC::Import $dump $myNs set ret [ReadALL $myNs] # RESTORE the original service-call EnvRestore $myNs # ANSWER the original service-call Send $myNs "R" "L" $ret
|
static |
Atl:
→ C-API MqContextC::EnvProtect $ctx
protect the service-environment
Definition at line 1372 of file MqContextC_atl.c.
|
static |
Atl:
→ C-API MqContextC::EnvRestore $ctx
restore the service-environment
Definition at line 1386 of file MqContextC_atl.c.