PostOnlineCommand and PreOfflineCommand
Use these commands to integrate WebSphere® MQ MSCS support with other systems. You can use them to issue WebSphere MQ commands, wih some restrictions.
Specify these commands in the Parameters to a resource of type IBM
WebSphere MQ MSCS
. You can use them to integrate
WebSphere MQ MSCS support with other systems
or procedures. For example, you could specify the name of a program
that sends a mail message, activates a pager, or generates some other
form of alert to be captured by another monitoring system.
PostOnlineCommand is invoked when the resource changes
from offline to online; PreOfflineCommand is invoked for a change
from online to offline. When invoked these commands are run, by default,
from the Windows system directory. Because WebSphere MQ uses a 32-bit
resource monitor process, on Windows 64-bit systems, this is the
\Windows\SysWOW64
directory rather than \Windows\system32
.
For more information, see the Microsoft documentation about file redirection
in a Windows x64 environment. Both commands run under the user account
used to run the MSCS Cluster Service; and are invoked asynchronously;
WebSphere MQ MSCS support does not wait
for them to complete before continuing. This eliminates any risk that
they might block or delay further cluster operations.
You can also use these commands to issue WebSphere MQ commands, for example to restart Requester channels. However, the commands are run at the point in time when the queue manager's state changes so they are not intended to perform long-running functions and must not make assumptions about the current state of the queue manager; it is quite possible that, immediately after the queue manager was brought online, an administrator issued an offline command.
If you want to run programs that depend on the state of the queue
manager, consider creating instances of the MSCS Generic Application
resource
type, placing them in the same MSCS group as the queue manager resource,
and making them dependent on the queue manager resource.