Saturday, January 15, 2011

WebSphere - Check MQ Activation Spec Status

In WAS 7, IBM replaced the old MQ Listener port with MQ Activation Spec, and it is not easy to check the status of MQ Activation Spec from administrative console.

However, we can use jython script to get the MQ Activation Spec. Here is the jython script:

Assume the MQ Activation Spec JNDI is mq/TestMQ_AS

asId=AdminControl.queryNames('type=J2CMessageEndpoint,ActivationSpec=mq/TestMQ_AS,process=server1,*)


as_status=AdminControl.invoke(asId,'getStatus')


as_status will equals the following 3 value

1-->Active

2-->Inactive

3-->Stopped

I never get the as_status =3.  If the module which is using the MQ Activation Spec is stopped. you will not get asId.

so I think in general, you will only get status as 1 or 2.

No comments:

Post a Comment