Messaging providers for IBM MQ classes for JMS

A JMS client (a Java application that uses the JMS API) uses a connection factory to create a connection with the JMS provider. The messaging provider that is used as the JMS provider determines which types of transport are available to use for the connection.

If you are using point-to-point messaging or if you are using the IBM® MQ Publish/Subscribe broker for publish/subscribe messaging, you must use IBM MQ as the messaging provider. The JMS client, therefore, connects to a queue manager and the type of transport that the connection uses depends on whether the JMS client is on the same computer as the queue manager:

  • If the JMS client is on a different computer from the queue manager, the JMS client must use a client connection (TCP/IP) to connect to the queue manager.
  • If the JMS client is on the same computer as the queue manager, the JMS client can connect to the queue manager directly using bindings or using a client connection (TCP/IP).

When you create a connection factory, you select which messaging provider will be used as the JMS provider. This constrains the connection factory to creating connections suitable only for the selected messaging provider. If you want to change messaging provider, you must create a new connection factory and specify a different messaging provider. For more information, see Creating a connection factory.

You can, however, change the type of transport used as long as the new transport is appropriate for the selected messaging provider. To do this, you must change the transport type that is associated with the connection factory that the JMS client uses to create connections. For more information, see Changing the transport type used for connections.