Configuring JMS resources using wsadmin scripting commands

You can use WebSphere® Application Server wsadmin scripting commands to create, modify, delete or show information about JMS activation specifications, connection factories, queues and topics. You can also display and manage the settings for the IBM® MQ resource adapter.

About this task

The following steps provide an overview of the ways in which you can use WebSphere Application Server wsadmin commands to configure JMS resources for use with the IBM MQ messaging provider. For more information about how to use these commands, see Related links for links to the WebSphere Application Server 8.5.5, 8.0 and 7.0 product documentation.

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

After using a command to create a new object or make changes, save your changes to the master configuration. For example, use the following command:

AdminConfig.save()
To see 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')
To see overview help on a given command, enter the following command at the wsadmin prompt:

print AdminTask.help('command_name')

Procedure

To list all of the IBM MQ messaging provider resources defined at the scope at which a command is issued, use the following commands.

  • To list the activation specifications, use the listWMQActivationSpecs command.
  • To list the connection factories, use the listWMQConnectionFactories command.
  • To list the queue type destinations, use the listWMQQueues command.
  • To list the topic type destinations, use the listWMQTopics command.

To create a JMS resource for the IBM MQ messaging provider at a specific scope, use the following commands.

  • To create an activation specification, use the createWMQActivationSpec command.
    You can either create an activation specification by specifying all the parameters to be used for establishing a connection, or you can create the activation specification so that it uses a client channel definition table (CCDT) to locate the queue manager to connect to.
  • To create a connection factory, use the createWMQConnectionFactory command, using the -type parameter to specify the type of connection factory that you want to create:
    • If your JMS application is intended to use only point-to-point messaging, create a domain-specific connection factory for the point-to-point messaging domain that can be used for creating connections specifically for point-to-point messaging.
    • If your JMS application is intended only to use publish/subscribe messaging, create a domain-specific connection factory for the publish/subscribe messaging domain that can be used for creating connections specifically for publish/subscribe messaging.
    • For JMS 1.1 or later, create a domain-independent connection factory that can be used for both point-to-point messaging and publish/subscribe messaging, allowing your application to perform both point-to-point and publish/subscribe work under the same transaction.
    The default type is domain-independent connection factory.
  • To create a queue type destination, use the createWMQQueue command.
  • To create a topic type destination, use the createWMQTopic command.

To modify a JMS resource for the IBM MQ messaging provider at a specific scope, use the following commands.

  • To modify an activation specification, use the modifyWMQActivationSpec command.
    You cannot change the type of an activation specification. For example, you cannot create an activation specification where you enter all the configuration information manually and then modify it to use a CCDT.
  • To modify a connection factory, use the modifyWMQConnectionFactory command.
  • To modify a queue type destination, use the modifyWMQQueue command.
  • To modify a topic type destination, use the modifyWMQTopic command.

To delete a JMS resource for the IBM MQ messaging provider at a specific scope, use the following commands.

  • To delete an activation specification, use the deleteWMQActivationSpec command.
  • To delete a connection factory, use the deleteWMQConnectionFactory command.
  • To delete a queue type destination, use the deleteWMQQueue command.
  • To delete a topic type destination, use the deleteWMQTopic command.

To display information about a specific IBM MQ messaging provider resource, use the following commands.

  • To display all the parameters, and their values, associated with a particular activation specification, use the showWMQActivationSpec command.
  • To display all the parameters, and their values, associated with a particular connection factory, use the showWMQConnectionFactory command.
  • To display all the parameters, and their values, associated with a particular queue type destination, use the showWMQQueue command.
  • To display all the parameters, and their values, associated with a topic type destination, use the deleteWMQTopic command.

To manage settings for the IBM MQ resource adapter or the IBM MQ messaging provider, use the following commands.

  • To manage the settings of the IBM MQ resource adapter that is installed at a particular scope, use the manageWMQ command.
  • To display all the parameters, and their values that can be set by the manageWMQ command, use the showWMQ command. These settings are either related to the IBM MQ resource adapter or the IBM MQ messaging provider. The showWMQ command also shows any custom properties that are set on the IBM MQ resource adapter.