theLink 10.0
Loading...
Searching...
No Matches
MqContextC_Env_JV_API

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

+ Collaboration diagram for MqContextC_Env_JV_API:

Functions

native void jvmqmsgque.MqContextC.EnvProtect ()
  Java: ctx.EnvProtect() C-API
protect the service-environment
 
native void jvmqmsgque.MqContextC.EnvRestore ()
  Java: ctx.EnvRestore() C-API
restore the service-environment
 
JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_EnvProtect (JNIEnv *env, jobject self)
  Java: ctx.EnvProtect() C-API
protect the service-environment
 
JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_EnvRestore (JNIEnv *env, jobject self)
  Java: 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 jvmqmsgque 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.java 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(server.this);
          MkBufferListC read = ReadALL();
          // RESTORE the original service-call
          EnvRestore();
          // ANSWER the original service-call
          Send("R", "L", read);

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 jvmqmsgque 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.java 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(server.this);
          MkBufferListC read = ReadALL();
          // RESTORE the original service-call
          EnvRestore();
          // ANSWER the original service-call
          Send("R", "L", read);

Function Documentation

◆ EnvProtect()

native void jvmqmsgque.MqContextC.EnvProtect ( )

Java: ctx.EnvProtect() C-API
protect the service-environment

◆ EnvRestore()

native void jvmqmsgque.MqContextC.EnvRestore ( )

Java: ctx.EnvRestore() C-API
restore the service-environment

◆ Java_jvmqmsgque_MqContextC_EnvProtect()

JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_EnvProtect ( JNIEnv * env,
jobject self )

Java: ctx.EnvProtect() C-API
protect the service-environment

Definition at line 800 of file MqContextC_jv.c.

800 {
801 MQ_CTX hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",self);
802 JavaErrorCheck;
803 MkRtSetup_X(hdl);
804 MqEnvProtect(hdl);
805error:
806 return;
807}
#define MkRtSetup_X(x)
struct MqContextS * MQ_CTX
class-shortcut for struct MqContextS *, all shortcut using the XX_YYY syntax (only for public API) …
#define MqEnvProtect(...)
PUBLIC data structure for the jvmqmsgque-specific-data

◆ Java_jvmqmsgque_MqContextC_EnvRestore()

JNIEXPORT void JNICALL Java_jvmqmsgque_MqContextC_EnvRestore ( JNIEnv * env,
jobject self )

Java: ctx.EnvRestore() C-API
restore the service-environment

Definition at line 810 of file MqContextC_jv.c.

810 {
811 MQ_CTX hdl = (MQ_CTX)pObj2Hdl(env,"MqContextC",self);
812 JavaErrorCheck;
813 MkRtSetup_X(hdl);
814 MqEnvRestore(hdl);
815error:
816 return;
817}
void MqEnvRestore(MQ_CTX ctx)
restore the service-environment