+

Search Tips   |   Advanced Search

Create a connection factory for the IBM MQ messaging provider

Create a connection factory, a queue connection factory, or a topic connection factory for use with the IBM MQ messaging provider.

With JMS 1.1, domain-independent connection factories are preferred to domain-specific queue connection factories and topic connection factories.

With JMS 2.0, a connection factory can be used to create both connections and contexts. As a result, it is possible to have a connection pool associated with a connection factory containing a mixture of both connections and contexts. IBM recommends that a connection factory is only used for creating connections or creating contexts. This ensures that the connection pool for that connection factory only contains objects of a single type, which makes the pool more efficient.

To create a connection factory, a queue connection factory, or a topic connection factory for use with the IBM MQ messaging provider, use the administrative console to complete the following steps. We can choose either to enter all the required connection information using the Create IBM MQ JMS resource wizard or to use a client channel definition table (CCDT) to establish a connection to the IBM MQ messaging provider.

For information about modifying an existing connection factory, see the related tasks.


Tasks

  1. In the navigation pane, select the type of connection factory we want to create:

    • To create a connection factory, click...

              Resources > JMS->Connection factories.

    • To create a queue connection factory, click...

              Resources > JMS->Queue connection factories.

    • To create a topic connection factory, click...

              Resources > JMS->Topic connection factories.

  2. Select the Scope setting corresponding to the scope of the connection factory to create.

  3. Click New in the content pane to start the Create IBM MQ JMS resource wizard.

  4. Select IBM MQ messaging provider, then click OK.

  5. On the "Configure basic attributes" page, specify the following properties, then click Next.

    Name

    The name by which this connection factory is known for administrative purposes within WebSphere Application Server.

    JNDI name

    The name used to bind this connection factory into the JNDI namespace.

    Description

    Optional. A description of this connection factory for administrative purposes within WAS.

  6. On the "Select connection method" page, choose how we want to specify the connection details for to the IBM MQ messaging provider by selecting one of the following options, then click Next.

    Enter all the required information into this wizard

    Choosing this option takes you to the "Supply queue manager details" page (see step 7), where we can start entering the connection details using the Create IBM MQ JMS resource wizard.

    Use a client channel definition table

    Choosing this option takes you to the "Specify client channel definition table" page (see step 8), where we can enter details of the client channel definition table to use.

  7. If we have chosen to enter all the required information using the wizard:

    1. On the "Supply queue manager details" page, enter the name of the queue manager or queue-sharing group to connect to then click Next.

    2. On the "Enter connection details" page, specify the details for the connection, then click Next to continue to the "Test connection" page. We can choose either to enter host and port information separately, or enter host and port information in the form of a connection name list. We must only choose the option to use a connection name list if we are creating a connection to a multi-instance queue manager. We must not use this option for connections to non-multi-instance queue managers as that can result in transaction integrity issues.

      Transport

      Optional. The IBM MQ transport type for the connection. The option selected is used to determine the exact mechanisms used to connect to IBM MQ. If we are configuring a transport type of bindings, then client or bindings, see Configure the IBM MQ messaging provider with native libraries information for more information.

      Enter host and port information in the form of separate hostname and port values

      This radio button is selected by default and enables the Hostname and Port fields and disables the Connection name list field. Leave this radio button selected to enter host and port information in the form of separate host name and port values.

      Hostname

      The host name, IPv4, or IPv6 address of the IBM MQ queue manager to connect to. Complete this field if we have selected Enter host and port information in the form of separate hostname and port values.

      Port

      Optional. The port number on which IBM MQ is listening. Complete this field if we have selected Enter host and port information in the form of separate hostname and port values.

      Enter host and port information in the form of a connection name list

      This radio button is cleared by default and, if selected, disables the Hostname and Port fields and enables the Connection name list field.

      • Click this radio button to select it to enter host and port information in the form of a connection list.
      • Leave this radio button cleared to enter host and port information in the form of separate hostname and port values.

      Connection name list

      The connection name list specifying the host name and port details to use when we want the connection factory to connect to a multi-instance queue manager. Complete this field if we have selected Enter host and port information in the form of a connection name list. Enter the host name and port details in the following form:

      host[(port)][,host(port)]

      host must be a valid TCP/IP host name or IPv4 or IPv6 address.

      port must be an integer value in the range 1 - 65536 (inclusive). The port information is optional, and if not specified, defaults to 1414.

      For example: localhost(1234),remotehost1(1234),remotehost2

      Server connection channel

      Optional. The IBM MQ server connection channel name used when connecting to IBM MQ queue manager or queue-sharing group.

  8. If we are using a channel client definition table to establish a connection to the IBM MQ messaging provider, complete the following fields on the "Specify client channel definition table" page, then click Next to continue to the "Test connection" page.

    Client channel definition table URL

    The URL to the client channel definition table to use when connecting to IBM MQ.

    Queue manager

    Optional. The name of the queue manager to be used to select one or more entries from the CCDT.

  9. Optional: On the "Test connection" page, to test establishing the connection, click Test connection. This test can take several seconds to perform.

  10. On the "Summary" page, complete the creation of the new connection factory by clicking Finish.

  11. Stop then restart the application server.

  • Configure a unified connection factory for the IBM MQ messaging provider
  • Configure a queue connection factory for the IBM MQ messaging provider
  • Configure a topic connection factory for the IBM MQ messaging provider
  • Configure the IBM MQ messaging provider with native libraries information
  • IBM MQ messaging provider connection factory settings
  • createWMQConnectionFactory command
  • deleteWMQConnectionFactory command
  • listWMQConnectionFactories command
  • modifyWMQConnectionFactory command
  • showWMQConnectionFactory command
  • JMS resource provider selection panel
  • JMS resource provider selection panel