To connect to IBM® MQ from WebSphere® Application Server Liberty, or other Java EE application servers, you must use the IBM MQ resource adapter. Since Liberty does not contain the IBM MQ resource adapter, you must obtain it separately from Fix
Central.
Before you begin
Before you start this task, make sure that you have a Java runtime environment (JRE) installed on your machine and that the JRE has
been added to the system path.
The Java installer that is used in this
installation process does not require running as root or any specific user. The only requirement is
that the user it is run as has access write to the directory that you want the files to go in.
About this task
The JAR file for the resource adapter that you can download from Fix Central is executable. When
you run this executable file, it displays the IBM MQ
license agreement, which must be accepted. It asks for a directory in which to install the IBM MQ resource adapter. The resource adapter RAR file and
installation verification test (IVT) program are then installed in that directory. You can either
accept the default or specify another directory, which might be the resource adapters directory of
an application server, or any other directory on your system. The directory is created as part of
the installation if it does not exist.
The name of the file to be downloaded is in the format of
<V.R.M.F>-WS-MQ-Java-InstallRA.jar, for example
8.0.0.6-WS-MQ-Java-InstallRA.jar.
After you have downloaded and installed the resource adapter, you are ready to configure it in
WebSphere Application Server Liberty.
Procedure
-
Download the IBM MQ resource adapter from Fix
Central:
-
Click Find Product then add the information for your IBM MQ installation to the following fields:
- In the Product Selector field, type MQ then select
WebSphere MQ from the displayed list.
- In the Installed Version field, click the arrow then select the version
number from the displayed list, for example 8.0.0.6.
- In the Platform field, click the arrow and select your platform, for
example, Windows 64-bit, x86.
Click
Continue.
-
Make sure that Browse for Fixes is selected and, under
Additional Query options, clear Show fixes that apply to this
version, and select Show fixes that get me to this version, then
click Continue.
Fix Central searches for the available fixes for your selected product, version and
platform, for example WebSphere, WebSphere MQ (8.0.0.6, Windows 64-bit,
x86).
-
Find the resource adapter in the displayed list of available fixes.
For
example:
release level: 8.0.0.6-WS-MQ-Install-Java-All
8.0.0.6 MQ Resource Adapter for use with Application Servers
Then
click the resource adapter file name and follow the download process.
-
Start the installation by entering the following command from the directory to which you
downloaded the file.
The format of the command is as
follows:
java -jar <V.R.M.F>-WS-MQ-Java-InstallRA.jar
where
<V.R.M.F>-WS-MQ-Java-InstallRA.jar
is the name of the file
that was downloaded from Fix Central.
For example, to install the
IBM MQ resource
adapter for the Version 8.0.0.6 release, you would use the following
command:
java -jar 8.0.0.6-WS-MQ-Java-InstallRA.jar
Note: To carry
out this installation, you must have a JRE installed on your machine and added to the system
path.
When you enter the command, the following information is
displayed:
Before you can use, extract, or install IBM WebSphere MQ V8.0, you must accept
the terms of 1. IBM International License Agreement for Evaluation of
Programs 2. IBM International Program License Agreement and additional
license information. Please read the following license agreements carefully.
The license agreement is separately viewable using the
--viewLicenseAgreement option.
Press Enter to display the license terms now, or 'x' to skip.
-
Review and accept the license terms:
-
To display the license, press Enter.
Alternatively, pressing x skips the display of the license.
After display of the license or immediately after selecting x, the following message
appears to tell you that you can choose to display additional license
terms:
Additional license information is separately viewable using the
--viewLicenseInfo option.
Press Enter to display additional license information now, or 'x' to skip.
-
To display the additional license terms, press Enter.
Alternatively, pressing x skips the display of the additional license terms.
After display of the additional license terms or immediately after selecting x, the
following message is displayed asking you to accept the license
agreement:
By choosing the "I Agree" option below, you agree to the terms of the
license agreement and non-IBM terms, if applicable. If you do not
agree, select "I do not Agree".
Select [1] I Agree, or [2] I do not Agree:
-
To accept the license agreement and continue with selecting the installation directory, select
1.
Alternatively, if you select 2 the installation terminates immediately.
If you selected 1, the following message appears, asking you to select a target
installation
directory:
Enter directory for product files or leave blank to accept the default value.
The default target directory is H:\Liberty\WMQ
Target directory for product files?
-
Specify the installation directory for the resource adapter:
- If you want to install the resource adapter in the default location, press Enter without
specifying a value.
- If you want to install the resource adapter in a different location from the default,
specify the name of the directory in which you want to install the resource adapter and then press
Enter.
After the files have been installed in the selected location, a confirmation message is
displayed as shown in the following
example:
Extracting files to H:\Liberty\WMQ\wmq
Successfully extracted all product files.
During
the installation, a new directory with the name
wmq is created within the
selected installation directory, and the following files are then installed in the
wmq directory:
- The installation verification test program, wmq.jmsra.ivt.
- The IBM MQ RAR file,
wmq.jmsra.rar.
-
Configure the resource adapter in WebSphere Application Server Liberty.
-
Add the wmqJmsClient-2.0 feature to the server.xml file to allow working
with the IBM MQ resource adapter.
The feature that you add (wmqJmsClient-1.1 or wmqJmsClient-2.0) depends on which version of
the resource adapter you have installed. The
IBM MQ 8.0
resource adapter must be deployed with the wmqJmsClient-2.0 feature. For more information, see
Which version of the resource adapter to use.
-
Add a reference to the wmq.jmsra.rar file that you have installed.
Note: For
Liberty versions up to
Version 8.5.5, Fix Pack 1, if an EJB is deployed using solely the
configuration within the
ejb-jar.xml, the version of
WebSphere Application Server that the
Liberty Profile is using must have APAR
PM89890 applied. This method of configuration is used for the resource adapter's
installation verification program (IVT), so this APAR is
required in order for the IVT to run.
An example configuration to support servlets and MDBs, with
JNDI might look like
this:
<featureManager>
<feature>wmqJmsClient-1.1</feature>
<feature>servlet-3.0</feature>
<feature>jmsMdb-3.1</feature>
<feature>jndi-1.0</feature>
</featureManager>
<variable name="wmqJmsClient.rar.location"
value="H:\Liberty\WMQ\wmq\wmq.jmsra.rar"/>