Checking the state of websphere MQ listeners and filepooling ports


Is it possible to check the state of MQ listeners and filepooling ports when the IS server is not up (not running) using any files?

Thanks and Regards,
Shriraksha A N


Could you explain your requirement in greater detail?

The reason I ask is, if the IS is down, the listeners and ports would be down as well. Why would you want to check their status when you know that the IS is down for a fact?

  • Hara


Thanks for the response…

Our production server works on active-passive mode. So, if one server is active, the other one will be in pasive mode. But while applying any code enhancements for passive server, we need to bring up that server. While doing so, we need to make sure that no live datas are get affected. Usually for passive servers we will keep the listeners and ports in disabled state only. But, by chance if they are in enable state, messages will be picked up and will get processed when the server is brought up. So, if we know the state of ports before starting the server, we can remove the messages from the polling folder/queue so that no messages will get processed.

Thanks and Regards,
Shriraksha A N


It does not make any sense.
You can only check the state of listeners and ports while IS is running.

What you could do before shutting down server in passive mode is to invoke a custom flow service which will take a snapshot of the listeners/ports states and save it as XML or other format to filesystem or DB. This flow service could do following :

  • take the snapshot by invoking the relevant built in services
  • save somewhere
  • switch all of them off (except for the admin port) using built in service.
  • invoke the shutdown
  • when switching back on, and when you will want to enable the listeneres/ports , have the service parse the saved states and re-enable the previously enabled listeners/ports.

If proper shutdown is done then the states upon startup should remain the same as before shutdown except for triggers which you need to have previously switched off using the “permanent” option.

But again checking listener or port state while IS is down is nonsense as IS is down so nothing is running :slight_smile: