Controlled Shutdown of the X4 Server (via JMX)
A controlled shutdown of the X4 Server during runtime ensures that all processes currently running are completed and no new processes are started.
Prerequisites for shutting down
This requires that the Can Stop
property is not set for processes that are not allowed to be stopped. Moreover, endless processes must be modeled in such a way that they interrupt processing at regular intervals so that they can be stopped.
Depending on the message queue adapter, this can be done as follows:
- JMS and RequestReply Transfer: Specify a timeout in parameter
timeout
. If the adapter returns the status 0, the queue is empty and the process control goes back to the adapter, allowing the process to be halted. - MQ Series Transfer and WebSphere MQ: Enable the parameter
MQGetMessageOptions.options.MQC.MQGMO_WAIT
to activate waiting for a message, and specify in parameterMQGetMessageOptions.waitInterval
a timeout in milliseconds that will be waited until an appropriate message can be received.
Access the
X4Management
MBeanStart the jconsole tool.
Open the MBean
X4Management
in a domainde.softproject.X4
Invoke the MBean method
setAllOutOfService()
.
TheOutOfService
property will be set for all processes. This causes that no more processes can be started.Invoke the MBean method
stopAllProcesses()
.
All processes that are currently executed and are allowed to be stopped, will be terminated.Wait until the MBean method
runningWorkflowCount()
displays 0.
No process is executed any longer.Alternatively, you can also invoke the
shutdownAllProcesses(longtimeoutInMS)
method. This causes the MBean methodssetAllOutOfService()
,stopAllProcesses()
, andrunningWorkflowCount()
to be executed consecutively.In ParamValue, specify a timeout in milliseconds, to be handed over to the method as parameter
longtimeoutInMS
.Click Invoke to execute the method. This returns
True
ifrunningWorkflowCount()
displays0
before the timeout exceeds.
Shut down the X4 Server.