WPS – Event sequencing for MQ activation spec in WPS7

From WPS7, IBM retired old listener port concept and replaced it with new MQ Activation Spec.

However, if the MQ activationSpec is not set up correctly in Cluster environment, the Event sequencing may not work.

In cluster environment, you have to create MQ Activation spec on each server level in the cluster, and assure only one MQ Activation Spec running.

Before going through the following steps, an ifix IZ86196 must be applied to make event sequencing work. please ask IBM for this ifix matched to your WAS version.

here is the examples how to set up MQ Activation Spec for event sequencing

(1) assume you have one cluster with two application servers (server1 and server2)

(2) go to administrative console, and then go to Resources->JMS->Activation Specifications

(3) create the MQ Activation Spec on eache server scope.

(4) after creating the MQ Activation Spec, go to created Activation Spec Custom properties, add the following property:

WAS_EndpointInitalState

and set it as true on server1 scope and set it as false on server2 scope.

(5) change another property maxPoolSize as 1 on both servers

(6) also go to Activation spec’s advanced properties, and set the maximum server sessions as 1 on both servers

(7) restart the server.

after restarting the server, the activation spec will be only running on one server, which assure the event squencing working

following jython script will let you change the stop or start MQ activation spec on another server

import sys

if len(sys.argv)<2:
print “Usage:changeASStatus.jy ASName ServerName action”
sys.exit()

if len(sys.argv)>1:
ASName=sys.argv[0]
serverName=sys.argv[1]

if len(sys.argv)>2:
Action=sys.argv[2]
else:
Action=””

print “————————————————–”
id=AdminControl.queryNames(‘type=J2CMessageEndpoint,ActivationSpec=’+ASName+’,’+’process=’+serverName+’,*’)

status=AdminControl.invoke(id,’getStatus’)

print ASName+”‘s current status:”+status
print “note: 1 (Active), 2 (Inactive), 3 (Stopped)”
print “——————————————————-”

if Action==”start”:

print “starting the ActivationSpec “+ASName
try:
AdminControl.invoke(id,’resume’)
print “ActivationSpec “+ASName+” started on server:”+serverName
except:
print “ActivationSpec “+ASNAme+” could not be started on server:”+serverName,sys.exc_info()[1]

if Action==”stop”:

print “stopping the ActivationSpec “+ASName
try:
AdminControl.invoke(id,’pause’)
print “ActivationSpec “+ASName+” stopped on server:”+serverName
except:
print “ActivationSpec “+ASNAme+” could not be stopped on server:”+serverName,sys.exc_info()[1]

if Action==””:
print “”

 

Advertisements

About this entry