Home
Name service interface
A name service provides the following entry points for use by the queue manager:
- MQZ_INIT_NAME
- Initialize the name service component.
- MQZ_TERM_NAME
- Terminate the name service component.
- MQZ_LOOKUP_NAME
- Look up the queue-manager name for the specified queue.
- MQZ_INSERT_NAME
- Insert an entry containing the owning queue-manager name for the specified queue into the directory used by the service.
- MQZ_DELETE_NAME
- Delete the entry for the specified queue from the directory used by the service.
If there is more than one name service configured:
- For lookup, the MQZ_LOOKUP_NAME function is invoked for each service in the list until the queue name is resolved (unless any component indicates that the search should stop).
- For insert, the MQZ_INSERT_NAME function is invoked for the first service in the list that supports this function.
- For delete, the MQZ_DELETE_NAME function is invoked for the first service in the list that supports this function.
Do not have more than one component that supports the insert and delete functions. However, a component that only supports lookup is feasible, and could be used, for example, as the last component in the list to resolve any name that is not known by any other name service component to a queue manager at which the name can be defined.
In the C programming language the names are defined as function datatypes using the typedef statement. These can be used to prototype the service functions, to ensure that the parameters are correct.
The header file that contains all the material specific to installable services is cmqzc.h for the C language.
Apart from the initialization function (MQZ_INIT_NAME), which must be the component’s main entry point, functions are invoked by the entry point address that the initialization function has added, using the MQZEP call.
The following examples of UNIX configuration file stanzas for the name service specify a name service component provided by the (fictitious) ABC company.
Figure 1. Name service stanzas in qm.ini (for UNIX systems)# Stanza for name service Service: Name=NameService EntryPoints=5 # Stanza for name service component, provided by ABC ServiceComponent: Service=NameService Name=ABC.Name.Service Module=/usr/lib/abcname ComponentDataSize=1024On Windows systems, name service stanza information is stored in the Registry.
Parent topic:
How the name service works
fa16530_
Home