+

Search Tips   |   Advanced Search


Set JMS resources for the WebSphere MQ messaging provider >

Set the WebSphere MQ messaging provider with native libraries information


To connect to a WebSphere MQ queue manager or queue-sharing group in bindings mode, the WebSphere MQ messaging provider needs to know where to load native libraries from. This information is known as native path information. The way native path information is set depends on whether the connection is established in an application client or in an appserver environment. Use this task to configure the WebSphere MQ messaging provider with native path information.

If running in a client environment, use launchClient to start a client application. In the system property MQ_INSTALL_ROOT enter the name of a directory that contains the WebSphere MQ native libraries, in a subdirectory of java/lib or java/lib64 depending on whether we are using 32 bit or 64 bit native libraries. For example, on Linux specify ./launchClient.sh myappclient.ear -CCDMQ_INSTALL_ROOT=/opt/mqm/.

If running in an appserver environment, we can configure the WebSphere MQ messaging provider with native path information using the command line, as described in WMQAdminCommands, or we can use the admin console to complete the following steps:

 

  1. In the navigation pane, expand Resources > JMS > JMS providers.

  2. Select the WebSphere MQ messaging provider that is at the correct Scope for the connection factory or activation specification that will create the bindings mode connection. Note that native path information at Server scope is used in preference to native path information at higher scopes, and native path information at Node scope is used in preference to native path information at Cell scope.

  3. Under General Properties, in the Native library path property, enter the full name of the directory that contains the WebSphere MQ native libraries.

    For example, on Linux enter /opt/mqm/java/lib. Enter only one directory name.

  4. Click OK.

  5. Save any changes to the master configuration.

  6. If running in an appserver environment, restart all affected servers twice when we have changed the native path information.

    Otherwise, a WMSG1623E message is produced, indicating that the WebSphere MQ messaging provider is not available.

    If running in a client environment, rerun the client program twice. Otherwise, a WMSG2013E message is produced.

    Whichever environment we are running in, until you perform these restarts any attempt to use a WebSphere MQ messaging provider resource (for example, a connection factory) from one of the affected servers causes a javax.naming.NamingException and a WMSG2003E message.

 

Related tasks


Create a connection factory for the WebSphere MQ messaging provider using the Create JMS Resource wizard