MqContextC - protect and restore the service-environment … More...
Functions | |
MQ_EXTERN void | libmqmsgque::MqEnvProtect_RT (MK_RT const mkrt, MQ_CTX ctx) |
protect the service-environment | |
MQ_EXTERN void | libmqmsgque::MqEnvRestore (MQ_CTX ctx) MK_ATTR_HDL |
restore the service-environment | |
MqEnvLog | |
MQ_EXTERN void | libmqmsgque::MqEnvLog_RT (MK_RT const mkrt, MQ_ENVN const env, MK_OBJN fmtobj, MK_DBG const debug, MK_STRN const callfunc, MK_I32 const lvl, MK_STRN const label) |
log the libmqmsgque::MqEnvS … | |
#define | MqEnvLog_0() |
#define | MqEnvLog_1(env) |
#define | MqEnvLog_2(env, fmt) |
#define | MqEnvLog_3(env, fmt, lbl) |
MqContextC - MqContextC_EnvApi_Env_C_API - overload | |
#define | MqEnvProtect_NULL(...) |
#define | MqEnvProtect(...) |
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 ccmqmsgque 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.cc
→ protect the environment and import from database
// PROTECT the original service-call EnvProtect(); // OVERWRITE the original service-call with data from the database dump->Import(this); MkBufferListC read = ReadALL(); // RESTORE the original service-call EnvRestore(); // ANSWER the original service-call Send("R", "L", read);
#define MqEnvLog_0 | ( | ) |
Definition at line 4692 of file LibMqMsgque_mq.h.
#define MqEnvLog_1 | ( | env | ) |
Definition at line 4693 of file LibMqMsgque_mq.h.
#define MqEnvLog_2 | ( | env, | |
fmt ) |
Definition at line 4694 of file LibMqMsgque_mq.h.
#define MqEnvLog_3 | ( | env, | |
fmt, | |||
lbl ) |
Definition at line 4695 of file LibMqMsgque_mq.h.
#define MqEnvProtect | ( | ... | ) |
Definition at line 171 of file msgque_overload_mq.h.
#define MqEnvProtect_NULL | ( | ... | ) |
Definition at line 170 of file msgque_overload_mq.h.
MQ_EXTERN void libmqmsgque::MqEnvLog_RT | ( | MK_RT const | mkrt, |
MQ_ENVN const | env, | ||
MK_OBJN | fmtobj, | ||
MK_DBG const | debug, | ||
MK_STRN const | callfunc, | ||
MK_I32 const | lvl, | ||
MK_STRN const | label ) |
log the libmqmsgque::MqEnvS …
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | env | the MqEnvS instance to work on |
[in] | fmtobj | managed object used to format the log-message (default=MK_NULL → use default-format) |
[in] | debug | the debug level from MkRuntimeS::debug, use 0 <= debug <= 9 (default=0 ) |
[in] | callfunc | a user-defined postfix to identify the calling function or the environment (default=name-of-function ) |
[in] | lvl | a user-defined prefix starting with "" for lvl=0 and increase with " " for lvl+1 (default=0 ) |
[in] | label | a string to identify a task or object |
protect the service-environment
[in] | mkrt | the MkRuntimeS instance to work on - the runtime argument, used by MK_RT_CALL (C-only) |
[in] | ctx | the MqContextS instance to work on |
restore the service-environment
[in] | ctx | the MqContextS instance to work on |