+

Search Tips | Advanced Search

Initialization and termination of components

The use of component initialization and termination options.

When the component initialization routine is invoked, it must call the queue manager MQZEP function for each entry-point supported by the component. MQZEP defines an entry-point to the service. All the undefined exit points are assumed to be NULL.

A component is always invoked once with the primary initialization option, before it is invoked in any other way.

A component can be invoked with the secondary initialization option on certain platforms. For example, it can be invoked once for each operating system process, thread, or task by which the service is accessed.

If secondary initialization is used:

  • The component can be invoked more than once for secondary initialization. For each such call, a matching call for secondary termination is issued when the service is no longer needed.

    For naming services this is the MQZ_TERM_NAME call.

    For authorization services this is the MQZ_TERM_AUTHORITY call.

  • The entry points must be re-specified (by calling MQZEP) each time the component is called for primary and secondary initialization.
  • Only one copy of component data is used for the component; there is not a different copy for each secondary initialization.
  • The component is not invoked for any other calls to the service (from the operating system process, thread, or task, as appropriate) before secondary initialization has been carried out.
  • The component must set the Version parameter to the same value for primary and secondary initialization.

The component is always invoked with the primary termination option once, when it is no longer required. No further calls are made to this component.

The component is invoked with the secondary termination option, if it has been invoked for secondary initialization.

Parent topic: Writing a service component

Last updated: 2020-10-04