manageWMQ command

Use the manageWMQ command to manage the settings of the WebSphere® MQ resource adapter that is installed at a particular scope.

To run the command, use the AdminTask object of the wsadmin scripting client.

[IBM i]The wsadmin scripting client is run from Qshell. For more information, see the topic about configuring Qshell to run product scripts.

This command is valid only when it is used with WebSphere Application Server Version 7 and later application servers. Do not use it with earlier versions.

For a list of the available IBM® MQ messaging provider administrative commands, plus a brief description of each command, enter the following command at the wsadmin prompt:

print AdminTask.help('WMQAdminCommands')

For overview help on a given command, enter the following command at the wsadmin prompt:

print AdminTask.help('command_name')

After using the command, save your changes to the master configuration. For example, use the following command:

AdminConfig.save()

Purpose

Use the manageWMQ command to manage the settings associated with the WebSphere MQ resource adapter that is installed at a particular scope.

You can use the manageWMQ command to manage the native library path and query the metadata of the specified WebSphere MQ resource adapter.

Target object

A WebSphere MQ resource adapter.

Required parameters

None.

Optional parameters

-nativePath
This parameter specifies the path to the WebSphere MQ messaging provider native libraries that are used by the WebSphere MQ resource adapter to establish a bindings mode connection to the queue manager. This parameter can be specified on a WebSphere MQ adapter at any scope.
-query
This parameter provides information about the level of WebSphere MQ resource adapter that is used by the WebSphere MQ messaging provider. This parameter can be specified on a WebSphere MQ resource adapter at any scope.
[z/OS]-enableInbound
[z/OS]This parameter enables inbound Java™ Platform, Enterprise Edition (Java EE) Connector Architecture (JCA) message delivery to WebSphere MQ resource adapter activation specifications on the z/OS® platform. This value can only be specified if the target WebSphere MQ resource adapter is at server scope. An application server restart is required for these changes to take effect.

The value of this parameter must be true or false.

The default value is false.

-disableWMQ
This parameter specifies whether or not to disable WebSphere MQ functionality at the scope of the specified resource adapter, and at all scopes following it.

The value of this parameter must be true or false.

The default value is false.

In a single server environment this parameter is valid only at the server scope. In a network deployment environment this parameter is valid at all scopes. The affect of setting this parameter to true depends on the scope at which you set it:

  • For a cell scoped WebSphere MQ resource adapter, all WebSphere MQ functionality on all application servers in the cell is disabled.
  • For a node scoped WebSphere MQ resource adapter, all WebSphere MQ functionality on all application servers that are part of that node is disabled.
  • For a cluster scoped WebSphere MQ resource adapter, all WebSphere MQ functionality on all application servers in that cluster are disabled.
  • For a server scoped WebSphere MQ resource adapter, all WebSphere MQ functionality in that particular application server is disabled.

In all cases, all affected processes must be restarted for the changes to take effect.

The value of the parameter at a higher scope takes precedence over the value at a lower scope. For example, if you set the parameter to false at the server scope but a higher (for example, cell) scoped WebSphere MQ messaging provider has the parameter set to true, the value at the cell scope takes precedence and WebSphere MQ functionality is therefore disabled in all application servers in the cell, regardless of the parameter value at the server scope.

-maxConnections
This parameter specifies the maximum number of connections to a WebSphere MQ queue manager.

The default value is 10.

-connectionConcurrency
This parameter specifies the maximum number of message-driven beans that can be supplied by each connection.

The default value is 1.

Setting this property only affects WebSphere Application Server 7 nodes. The property has no effect for WebSphere Application Server Version 8 or later nodes.

-reconnectionRetryCount
This parameter specifies the maximum number of attempts made by a WebSphere MQ messaging provider activation specification to reconnect to a WebSphere MQ queue manager if a connection fails.

The default value is 5.

-reconnectionRetryInterval
This parameter specifies the time, in milliseconds, that a WebSphere MQ messaging provider activation specification waits prior to making another attempt to reconnect to a WebSphere MQ queue manager.

The default value is 300000.

-customProperties
This parameter specifies custom properties to be passed to the WebSphere MQ resource adapter. Typically, custom properties are used to set attributes of the WebSphere MQ resource adapter that are not directly supported through the WebSphere Application Server administration interfaces.
Each custom property is specified using name and value table step parameters. Since these are table steps, the order of the two parameters is fixed, so you must always specify the name first and the value second:
  • In Jython: [name value]
  • In Jacl: {name value}
New name/value pairs are added to the existing set of custom properties using the following rules:
  • If the existing set of properties does not contain a property with the same name as that which is supplied, the supplied property is added to the set of custom properties, unless the custom property has no value specified, when it is disregarded.
  • If the existing set of properties contains a property with the same name as that supplied as part of a modify command, and the modify command also specifies a value for the property, the existing value is replaced by the supplied value.
  • If the existing set of properties contains a property with the same name as that supplied as part of a modify command, but the modify command does not specify a value for the property, the property with the same name is deleted from the existing set of custom properties.

Examples

The following example shows how to enable inbound JCA message delivery on the z/OS platform.
  • Using Jython:
    wsadmin>AdminTask.manageWMQ("WebSphere MQ Resource Adapter
    (cells/L3A3316Node04Cell/nodes/L3A3316Node05/servers/server1|resources.xml#
    J2CResourceAdapter_1201601803796)", ["-enableInbound true"])
  • Using Jacl:
    wsadmin>$AdminTask manageWMQ "WebSphere MQ Resource Adapter
    (cells/L3A3316Node04Cell/nodes/L3A3316Node05/servers/server1|resources.xml#
    J2CResourceAdapter_1201601803796)" {-enableInbound true}
The following example sets the value of -maxConnections to 100 and adds a custom property with name name1 and value value1.
  • Using Jython:
    AdminTask.manageWMQ("WebSphere MQ Resource Adapter(
    cells/L3A3316Node01Cell|resources.xml#J2CResourceAdapter_1284547647859)", 
    ["-maxConnections 100 -customProperties [[name1 value1]]"])
  • Using Jacl:
    wsadmin>$AdminTask manageWMQ "WebSphere MQ Resource Adapter(
    cells/L3A3316Node01Cell|resources.xml#J2CResourceAdapter_1284547647859)" 
    {-maxConnections 100 -customProperties {{name1 value1}}}