Date Created: Sun 13-Mar-2011

Related Document Categories:

Get my WebSphere MQ course here >> http://www.themiddlewareshop.com/products/


    How to disable WMQ in WebSphere 8 using manageWMQ command with Jython



    #Get cell name
    cellName = AdminControl.getCell()
    print cellName
    nodeName = AdminControl.getNode()
    print nodeName
    serverName="server01"
    print serverName
    #Get List of J2C Resource Adapters
    ras = AdminUtilities.convertToList(AdminConfig.list('J2CResourceAdapter'))

    #Iterate through [Built In WebSphere MQ Resource Adapter]s and find server01, then set MQ as disabled
    for ra in ras :
    desc = AdminConfig.showAttribute(ra, "description")
    #print "J2CResource Adapter: " + ra
    #print desc
    #decr will contain one of the follwing to when no service pack is applied
    #WAS 7.0 Built In WebSphere MQ Resource Adapter
    #WAS 7.0.0.1 Built In WebSphere MQ Resource Adapter
    #if (desc == "WAS 7.0 Built In WebSphere MQ Resource Adapter") or (desc == "WAS 7.0.0.1 Built In WebSphere MQ Resource Adapter"):
    #print desc.find("Built In WebSphere MQ Resource Adapter")
    if desc.find("Built In WebSphere MQ Resource Adapter") > 0:
    #print "Match found"
    if ra.find(serverName) > 0:
    #print serverName + ": found in adapter list"
    AdminTask.manageWMQ(ra, '[-nativePath -disableWMQ true ]')
    AdminConfig.save()
    print "WMQ has been disabled for server01"
    #end if
    #end if
    #end for

Get my WebSphere MQ course here >> http://www.themiddlewareshop.com/products/

Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Other Categories