Working with services
Service objects are a means by which additional processes can be managed as part of a queue manager. With services, we can define programs that are started and stopped when the queue manager starts and ends. IBM MQ services are always started under the user ID of the user who started the queue manager.
Service objects can be either of the following types:
- Server
- A server is a service object that has the parameter SERVTYPE specified as
SERVER. A server service object is the definition of a program that is executed
when a specified queue manager is started. Server service objects define programs that typically run
for a long time. For example, a server service object can be used to execute a trigger monitor
process, such as runmqtrm.
Only one instance of a server service object can run concurrently. The status of running server service objects can be monitored using the MQSC command, DISPLAY SVSTATUS.
- Command
- A command is a service object that has the parameter SERVTYPE specified as
COMMAND. Command service objects are similar to server service objects, however
multiple instances of a command service object can run concurrently, and their status cannot be
monitored using the MQSC command DISPLAY SVSTATUS.
If the MQSC command, STOP SERVICE, is executed, no check is made to determine whether the program started by the MQSC command, START SERVICE, is still active before stopping program.