IBM Support

How can I start and stop a messaging engine and check its status in Websphere Application Server using wsadmin scripting?

Question & Answer


Question

I would like to administer a messaging engine in my traditional WebSphere Application Server environment using a Jython script. Particularly, I would like to start and stop the messaging engine and check its status. How can this be achieved?

Answer

The following wsadmin commands can be deployed to administer messaging engines in WebSphere Application Server:

# Get a messaging engine object from the system
myME=AdminControl.queryNames('type=SIBMessagingEngine,*').splitlines()[0]

# Get the messaging engine status
AdminControl.invoke(myME, 'state')

# Start the messaging engine
AdminControl.invoke(myME, 'start')

# Stop the messaging engine (immediate stop)
AdminControl.invoke(myME, 'stop')

# Force the messaging engine to stop
AdminControl.invoke(myME, 'stop', 'FORCE')

[{"Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"ARM Category":[{"code":"a8m50000000Cd8dAAC","label":"SIB JMS-JMS-MQ RA - JMS general"}],"ARM Case Number":"TS004497877","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Document Information

Modified date:
13 November 2020

UID

ibm16367819