theLink 10.0
Loading...
Searching...
No Matches
MqContextC_Env_TCL_API

MqContextC - protect and restore the service-environment … More...

+ Collaboration diagram for MqContextC_Env_TCL_API:

Functions

static OT_ProcRet tclmqmsgque_MqContextC_EnvProtect (MqContextC_ARGS)
  Tcl: $ctx EnvProtect C-API
protect the service-environment
 
static OT_ProcRet tclmqmsgque_MqContextC_EnvRestore (MqContextC_ARGS)
  Tcl: $ctx EnvRestore C-API
restore the service-environment
 

Detailed Description

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 tclmqmsgque 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:

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.tcl protect the environment and import from database

        # PROTECT the original service-call
        my EnvProtect
        # OVERWRITE the original service-call with data from the database
        $dump Import [self]
        set ret [my ReadALL]
        # RESTORE the original service-call
        my EnvRestore
        # ANSWER the original service-call
        my Send "R" "L" $ret

Function Documentation

◆ tclmqmsgque_MqContextC_EnvProtect()

static OT_ProcRet tclmqmsgque_MqContextC_EnvProtect ( MqContextC_ARGS )
static

Tcl: $ctx EnvProtect C-API
protect the service-environment

Definition at line 1394 of file MqContextC_tcl.c.

1394 {
1398 MqEnvProtect (hdl);
1400 goto end;
1401 error:
1403 end:
1405}
#define OT_SETUP_NOARG(d)
#define OT_retObj_SET_Error
#define OT_retObj_SET_None
#define OT_retObj_RETURN
#define OT_CHECK_NOARGS
#define OT_SETUP_hdl
#define EnvProtect_doc
#define error
Definition high_lng.h:339
#define MqEnvProtect(...)

◆ tclmqmsgque_MqContextC_EnvRestore()

static OT_ProcRet tclmqmsgque_MqContextC_EnvRestore ( MqContextC_ARGS )
static

Tcl: $ctx EnvRestore C-API
restore the service-environment

Definition at line 1408 of file MqContextC_tcl.c.

1408 {
1412 MqEnvRestore (hdl);
1414 goto end;
1415 error:
1417 end:
1419}
#define EnvRestore_doc
void MqEnvRestore(MQ_CTX ctx)
restore the service-environment