MQ notes on Javatm and JMS, download, install, run, trace - IBM

26
Page 1 of 26 MQ notes on Java tm and JMS, download, install, run, trace https://www.ibm.com/support/pages/node/6487751 Date last updated: 9-Sep-2021 Angel Rivera IBM MQ Support https://www.ibm.com/products/mq/support Find all the support you need for IBM MQ Trademark notice: Java is a registered trademark of Oracle and/or its affiliates. +++ Objective This document provides a collection of notes related to Java, the support for Java/JMS in MQ, how to download the different packages that have the MQ Java/JMS, how to install, how to run the JMS samples and how to gather trace. 1: ++ What is Java and what are the differences between Java EE and Java SE 2: ++ Example of MQ interim fixes for C-based and for Java/JMS 3: ++ How Java Versions are named 4: ++ Typical problem when customer compiles code at one version and tries to run in another: Unsupported major.minor Unsupported major.minor 5: ++ MQ provides 2 different sets of *.jar files: MQ Classes for Java and MQ Classes for JMS 6: ++ MQ provides both the Java Runtime Environment (JRE) and the MQ Java Development Toolit (JDK) 7: ++ What levels of the JRE are shipped with MQ? 8: ++ How do the MQ requirements specify the supported Java versions? 9: ++ About AdoptOpenJDK and OpenJDK 10: ++ How to download the MQ Classes for Java and MQ Classes for JMS 11: ++ How to install the MQ JRE and the MQ Classes 12: ++ Running MQ JMS samples using the JRE provided with MQ 13: ++ Running with trace

Transcript of MQ notes on Javatm and JMS, download, install, run, trace - IBM

Page 1 of 26

MQ notes on Javatm and JMS download install run trace

httpswwwibmcomsupportpagesnode6487751

Date last updated 9-Sep-2021

Angel Rivera IBM MQ Support

httpswwwibmcomproductsmqsupport Find all the support you need for IBM MQ

Trademark notice Java is a registered trademark of Oracle andor its affiliates +++ Objective This document provides a collection of notes related to Java the support for JavaJMS in MQ how to download the different packages that have the MQ JavaJMS how to install how to run the JMS samples and how to gather trace 1 ++ What is Java and what are the differences between Java EE and Java SE 2 ++ Example of MQ interim fixes for C-based and for JavaJMS 3 ++ How Java Versions are named 4 ++ Typical problem when customer compiles code at one version and tries to run in another Unsupported majorminor Unsupported majorminor 5 ++ MQ provides 2 different sets of jar files MQ Classes for Java and MQ Classes for JMS 6 ++ MQ provides both the Java Runtime Environment (JRE) and the MQ Java Development Toolit (JDK) 7 ++ What levels of the JRE are shipped with MQ 8 ++ How do the MQ requirements specify the supported Java versions 9 ++ About AdoptOpenJDK and OpenJDK 10 ++ How to download the MQ Classes for Java and MQ Classes for JMS 11 ++ How to install the MQ JRE and the MQ Classes 12 ++ Running MQ JMS samples using the JRE provided with MQ 13 ++ Running with trace

Page 2 of 26

1 ++ What is Java and what are the differences between Java EE and Java SE httpsdocsoraclecomjavaee6firstcupdocgkhoyhtml Differences between Java EE and Java SE + begin excerpt Java technology is both a programming language and a platform - The Java programming language is a high-level object-oriented language that has a particular syntax and style - A Java platform is a particular environment in which Java programming language applications run The Java Programming Language Platforms - Java Platform Standard Edition (Java SE) - Java Platform Enterprise Edition (Java EE) All Java platforms consist of a Java Virtual Machine (VM) and an application programming interface (API) The Java Virtual Machine is a program for a particular hardware and software platform that runs Java technology applications An API is a collection of software components that you can use to create other software components or applications Each Java platform provides a virtual machine and an API and this allows applications written for that platform to run on any compatible system with all the advantages of the Java programming language platform-independence power stability ease-of-development and security Java SE When most people think of the Java programming language they think of the Java SE API Java SEs API provides the core functionality of the Java programming language It defines everything from the basic types and objects of the Java programming language to high-level classes that are used for networking security database access graphical user interface (GUI) development and XML parsing In addition to the core API the Java SE platform consists of a virtual machine development tools deployment technologies and other class libraries and toolkits commonly used in Java technology applications (Note from Angel ldquoStandalonerdquo MQ JMS clients use Java SE) Java EE The Java EE platform is built on top of the Java SE platform The Java EE platform provides an API and runtime environment for developing and running large-scale multi-tiered scalable reliable and secure network applications (Note from Angel IBM WebSphere Application Server uses Java EE and using the MQ Resource Adapter in JCA) + end excerpt

Page 3 of 26

2 ++ Example of MQ interim fixes for C-based and for JavaJMS C-language applications are faster than JavaJMS because they are compiled and linked ldquonativelyrdquo using the Operating System and the appropriate platformhardware APIs The disadvantage is that the C source code has to be compiled and linked for EVERY Operating System and Hardware For example httpl3hursleyibmcomcgi-binViewPRBplstandard6967prbampIT30409 IT30409 The dmpmqcfg utility reports timeout errors (6967prb) Platforms AIXHP-UXLinuxOS400SolarisWindows Fixes 80013-WS-MQ-AIXPPC64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-Linux_z64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-LinuxX64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-SolarisSparc64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-SolarisX64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-Win64-LAIT30409html - Click to view README andor download fix IT30409-IBMi-80013zip - Click to download fix with README 9009-WS-MQ-AIXPPC64-LAIT30409html - Click to view README andor download fix 9009-WS-MQ-LinuxX64-LAIT30409html - Click to view README andor download fix 9009-WS-MQ-SolarisSparc64-LAIT30409html - Click to view README andor download fix 9009-WS-MQ-SolarisX64-LAIT30409html - Click to view README andor download fix 9009-WS-MQ-Win64-LAIT30409html - Click to view README andor download fix On the other hand the source code for JavaJMS (extension java) is compiled into a portable ldquoByteCoderdquo (binary with extension class) Then this ByteCode is fed into the Java Virtual Machine that runs with the Operating System Hardware and it is run there This gives the advantage that JavaJMS applications ldquoare compiled once and run everywhererdquo For example httpl3hursleyibmcomcgi-binViewPRBpl7100 IT36701 - MQ-JMS poison message handling fails in compatibility mode when consuming from EBCDIC queue manager (7100prb) Platforms AIXHP-UXLinuxSolarisWindows Fixes 9210-WS-MQ-JavaVM-IT36701zip - iFix for MQ classes for JMS v921 CD 9202-WS-MQ-JavaVM-IT36701zip - iFix for MQ classes for JMS v9202 LTS 9203-WS-MQ-JavaVM-IT36701zip - iFix for MQ classes for JMS v9203 LTS

Page 4 of 26

3 ++ How Java Versions are named Originally it started like this Java 11 Java 12 hellip Java 17 Java 18 But the company (Sun) that maintained Java decided to introduce an alias that remove the ldquo1xrdquo which means Java 17 =gt also known as Java 7 Java 18 =gt also known as Java 8 + Output of the command java -version Note that java version 180 java 80 hellip Java(TM) SE Runtime Environment (build 8067 hellip JRE 8067 Example from Windows Cgt java -version java version 180 Java(TM) SE Runtime Environment (build pwa6480sr4fp2-20170322_01(SR4 FP2)) IBM J9 VM (build 28 JRE 180 Windows 10 amd64-64 Compressed References 20170314_340265 (JIT enabled AOT enabled) J9VM - R28_20170314_2309_B340265 JIT - trr14javagreen_20170314_134138 GC - R28_20170314_2309_B340265_CMPRSS J9CL - 20170314_340265) JCL - 20170318_01 based on Oracle jdk8u121-b13 Example from Linux $ java -version java version 180_241 Java(TM) SE Runtime Environment (build 8067 - pxa6480sr6fp7-20200312_01(SR6 FP7)) IBM J9 VM (build 29 JRE 180 Linux amd64-64-Bit Compressed References 20200219_440062 (JIT enabled AOT enabled) OpenJ9 - 3088245 OMR - eb95a4d IBM - 83517b6) JCL - 20200310_01 based on Oracle jdk8u241-b07

Page 5 of 26

4 ++ Typical problem when customer compiles code at one version and tries to run in another Unsupported majorminor The Java Runtime Environment (JRE) is backward compatible with older versions Thus the JRE 15 can run Java programs compiled at 14 BUT the JRE 14 CANNOT run Java programs compiled at 15 Unfortunately the runtime error is super geeky Unsupported majorminor For more details see the following technote httpswwwibmcomsupportpagesnode157337 Runtime Java error Unsupported majorminor - UnsupportedClassVersionError Problem You are trying to run in a system that has a runtime OLD version of Java (such as 14 which is called the minor version) a Java class file that was compiled under a NEW version of Java (such as 15 which is called the major version) thus the error message

Page 6 of 26

5 ++ MQ provides 2 different sets of jar files MQ Classes for Java and MQ Classes for JMS + Major rework on the MQ Classes for Java and MQ Classes for JMS in MQ 70 Prior to MQ 70 the classes for Java and JMS were combined which resulted in confusion by many customers A major rework was done in MQ 70 and there is a clean split between MQ Classes for Java MQ Classes for JMS

The vast majority of the MQ customers are using MQ Classes for JMS

- MQ Classes for Java =gt few customers use it (it is STABILIZED) This code is NOT optimized for messaging It is still possible to use MQ APIs for connecting

opening a queue putting a message etc The MQ API is NOT portable with other Java messaging providers httpwwwibmcomsupportknowledgecenterenSSFKSJ_900comibmmqprodocq

127140_htm Deprecated stabilized and removed features Version 900 A number of features are deprecated stabilized or removed from IBMreg MQ Version 90 bull Stabilization of IBM MQ classes for Java ==gt instead use MQ classes for JMS

This means that NO new features or improvements will be done Instead any new features or improvements will be done with ldquoMQ Classes for JMSrdquo - MQ Classes for JMS =gt most customers are using it JMS is Java That is it is NOT a different program language JMS means ldquoJava Messaging Servicerdquo and it is a Standard in the industry MQ supports JMS 10 11 and 20 MQ 80 introduced the support for MQ 20 There are many JMS messaging providers It is optimized for messaging

+ How to distinguish when a user is using Java or JMS Ask the customer to look into the ldquoimportrdquo section in the source code in the java for their MQ client application If there are entries that have ldquojmsrdquo in them then they are using JMS such as import javaxjmsConnection

Or if the error message includes strings with ldquojmsrdquo

Page 7 of 26

6 ++ MQ provides both the Java Runtime Environment (JRE) and the MQ Java Development Toolit (JDK) MQ provides the JRE as an optional component to install in order to run some Java-base GUI utililities such as the MQ Explorer and the GSKit tools MQ provides the MQ JDK inside the overall component of ldquoMQ Software Development Kit (SDK)rdquo in order for customers to compile and link MQ client applications for Java or JMS MQ does NOT include the full Java SDK Customers need to download and install it The Java SDK command to compile code is javac The utility ldquojavacrdquo is NOT provided by MQ but it is provided by the full Java SDK

Page 8 of 26

7 ++ What levels of the JRE are shipped with MQ This article provides the details on the levels of GSKit JRE IBM Security Directory Server Client and WebSphere Application Server Liberty profile included with various maintenance levels of IBM MQ httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ

For example IBM MQ 92 Long Term Support GSKit Level JRE Level IBM Security WebSphere

Directory Application

Server Client Server

Level Liberty

profile

9203 (Windows Linux AIX) 805524 80631 64023 21006

9202 (Windows Linux AIX) 805521 80626 64022 200012

9201 (Windows Linux AIX) 805517 80615 64020 20006

9200 (Windows Linux AIX) 805516 80610 64020 20003

Page 9 of 26

8 ++ How do the MQ requirements specify the supported Java versions Letrsquos start with the obvious If MQ ships a specific level of the JRE the MQ supports it It is also the level that the MQ Development team has tested the MQ fix pack httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ BUT hellip due to the compatibility nature of Java it is possible for customers to run applications with a different level of the JRE The levels and types of the JRE that are supported are mentioned in httpswwwibmcomsupportpagesnode318077 System Requirements for IBM MQ For example from the table follow the links for IBM MQ Version 92 IBM MQ LTS and CD Releases You will land at httpswwwibmcomsupportpagessystem-requirements-ibm-mq-92 System Requirements for IBM MQ 92 For example from the table follow the links for IBM MQ 92 LTS By Operating System Linux You will land at httpswwwibmcomsoftwarereportscompatibilityclarity-reportsreporthtmlsoftwareReqsForProductdeliverableId=0A8B49C00A0B11EABCF401BE73544226amposPlatforms=LinuxampduComponentIds=D005|S011|S006|S010|S008|S007|S009|A004|A003|A001|A002ampmandatoryCapIds=16ampoptionalCapIds=30|341|47|12|9|1|25|20|28|184|185|70|16|15|26 IBM MQ 92 Detailed System Requirements 9203 maintenance level

Page 10 of 26

Select the tab Supported Software Select the section Java Java Except on zOS and IBM I the following IBM MQ product components only support the Java runtime packaged with them The Java runtime cannot be changed AMQP Service MQ Queue Manager MQ Telemetry Server MQ Managed File Transfer Service MQ Managed File Transfer Agent On zOS and IBM I the Java runtime is a prerequisite and the supported versions are described below Note that the MQ Queue Manager components includes the mqweb server component For the MQ Java and JMS clients the Java support is the same whether the connection is over TCPIP or via local bindings AdoptOpenJDK with OpenJ9 JVM

11 and future fix packs IBM Runtime Environment Java Technology Edition

8 and future fix packs 801 and future fix packs 8041 and future fix packs 8050 and future fix packs 8060 and future fix packs Oracle Java SDKJREJDK

80 and future fix packs 1101 and future fix packs Remember that when you use ldquojava -versionrdquo you will see something like java 18 (instead of version 8) You have to ldquoremoverdquo the ldquo1rdquo in order to find out the version

Page 11 of 26

9 ++ About AdoptOpenJDK and OpenJDK MQ 915 CD supports AdoptOpenJDK version 11 and later MQ 92 also supports AdoptOpenJDK version 11 and later The terminology is a bit confusing though The system requirements for MQ are very specific about supporting AdoptOpenJDK which is (see item ldquo1drdquo) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by community (open source licensed) MQ does NOT support ldquoOpenJDKrdquo (using the strict definition of the term ldquo1crdquo) Please note that the following specific term is NOT included in our supported requirements OpenJDK has a very specific meaning prebuilt OpenJDK binaries maintained by Oracle Notes - MQ 914 CD and earlier CDs do NOT support AdoptOpenJDK - MQ 910x LTS (such as 9105) do NOT support AdoptOpenJDK - MQ 90x LTSCD do NOT support AdoptOpenJDK + Difference between OpenJDK and AdoptOpenJDK httpsstackoverflowcomquestions52431764difference-between-openjdk-and-adoptopenjdk In short 1) OpenJDK has multiple meanings and can refer to 1a) free and open source implementation of the Java Platform Standard Edition (Java SE) 1b) open source repository mdash the Java source code aka OpenJDK project 1c) prebuilt OpenJDK binaries maintained by Oracle 1d) prebuilt OpenJDK binaries maintained by the OpenJDK community (open source licensed) =gt AdoptOpenJDK 2) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by OpenJDK community (open source licensed) This is the same as 1d above

Page 12 of 26

10 ++ How to download the MQ Classes for Java and MQ Classes for JMS There are several ways for a customer to get the MQ Classes for Java and MQ Classes for JMS There are several factors to take into account - Is there plenty of disk space Or very limited disk available - Are they using an application server such as JBoss or WebLogic - Is the customer developing an MQ client application which will be packaged in such a way that the MQ jar files will be included (This is the MQ Redistributable package which avoids the end user to download the MQ jar files) Please see the following VERY COMPREHENSIVE article which has a table comparing the different methods httpswwwibmcomsupportpagesnode597665 Installation scenarios for MQ 80 and 90 in Linux and Windows Key concepts - Redistributable distribute the runtime with an application both inside and outside of your environment - Relocatable put the files somewhere else other than a fixed default location + MQ Server media Must download from IBM Passport Advantage From IBM Passport Advantage you can download the manufacturing refresh MQ 9202 LTS that includes 9200 + 9201 + 9202 httpswwwibmcomsoftwarepassportadvantagepao_customerhtml search for Part Number CC9S0ML Description IBM MQ 9202 Long Term Support Release for Linux on x86 64-bit eImage Linux Filename IBM_MQ_9202_LINUX_X86-64targz CC9S4ML Description IBM MQ 9202 Long Term Support Release for Windows 64-bit elmage Windows Filename IBM_MQ_9202_WINDOWSzip CC9RWML Description IBM MQ 9202 Long Term Support Release for AIX eImage This option is very easy but requires plenty of disk space It is installed by user ldquorootrdquo Administrator The installation uses the OS facilities and the OS knows that MQ is installed It does not include the ldquoRedistributablerdquo jar files

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 2 of 26

1 ++ What is Java and what are the differences between Java EE and Java SE httpsdocsoraclecomjavaee6firstcupdocgkhoyhtml Differences between Java EE and Java SE + begin excerpt Java technology is both a programming language and a platform - The Java programming language is a high-level object-oriented language that has a particular syntax and style - A Java platform is a particular environment in which Java programming language applications run The Java Programming Language Platforms - Java Platform Standard Edition (Java SE) - Java Platform Enterprise Edition (Java EE) All Java platforms consist of a Java Virtual Machine (VM) and an application programming interface (API) The Java Virtual Machine is a program for a particular hardware and software platform that runs Java technology applications An API is a collection of software components that you can use to create other software components or applications Each Java platform provides a virtual machine and an API and this allows applications written for that platform to run on any compatible system with all the advantages of the Java programming language platform-independence power stability ease-of-development and security Java SE When most people think of the Java programming language they think of the Java SE API Java SEs API provides the core functionality of the Java programming language It defines everything from the basic types and objects of the Java programming language to high-level classes that are used for networking security database access graphical user interface (GUI) development and XML parsing In addition to the core API the Java SE platform consists of a virtual machine development tools deployment technologies and other class libraries and toolkits commonly used in Java technology applications (Note from Angel ldquoStandalonerdquo MQ JMS clients use Java SE) Java EE The Java EE platform is built on top of the Java SE platform The Java EE platform provides an API and runtime environment for developing and running large-scale multi-tiered scalable reliable and secure network applications (Note from Angel IBM WebSphere Application Server uses Java EE and using the MQ Resource Adapter in JCA) + end excerpt

Page 3 of 26

2 ++ Example of MQ interim fixes for C-based and for JavaJMS C-language applications are faster than JavaJMS because they are compiled and linked ldquonativelyrdquo using the Operating System and the appropriate platformhardware APIs The disadvantage is that the C source code has to be compiled and linked for EVERY Operating System and Hardware For example httpl3hursleyibmcomcgi-binViewPRBplstandard6967prbampIT30409 IT30409 The dmpmqcfg utility reports timeout errors (6967prb) Platforms AIXHP-UXLinuxOS400SolarisWindows Fixes 80013-WS-MQ-AIXPPC64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-Linux_z64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-LinuxX64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-SolarisSparc64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-SolarisX64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-Win64-LAIT30409html - Click to view README andor download fix IT30409-IBMi-80013zip - Click to download fix with README 9009-WS-MQ-AIXPPC64-LAIT30409html - Click to view README andor download fix 9009-WS-MQ-LinuxX64-LAIT30409html - Click to view README andor download fix 9009-WS-MQ-SolarisSparc64-LAIT30409html - Click to view README andor download fix 9009-WS-MQ-SolarisX64-LAIT30409html - Click to view README andor download fix 9009-WS-MQ-Win64-LAIT30409html - Click to view README andor download fix On the other hand the source code for JavaJMS (extension java) is compiled into a portable ldquoByteCoderdquo (binary with extension class) Then this ByteCode is fed into the Java Virtual Machine that runs with the Operating System Hardware and it is run there This gives the advantage that JavaJMS applications ldquoare compiled once and run everywhererdquo For example httpl3hursleyibmcomcgi-binViewPRBpl7100 IT36701 - MQ-JMS poison message handling fails in compatibility mode when consuming from EBCDIC queue manager (7100prb) Platforms AIXHP-UXLinuxSolarisWindows Fixes 9210-WS-MQ-JavaVM-IT36701zip - iFix for MQ classes for JMS v921 CD 9202-WS-MQ-JavaVM-IT36701zip - iFix for MQ classes for JMS v9202 LTS 9203-WS-MQ-JavaVM-IT36701zip - iFix for MQ classes for JMS v9203 LTS

Page 4 of 26

3 ++ How Java Versions are named Originally it started like this Java 11 Java 12 hellip Java 17 Java 18 But the company (Sun) that maintained Java decided to introduce an alias that remove the ldquo1xrdquo which means Java 17 =gt also known as Java 7 Java 18 =gt also known as Java 8 + Output of the command java -version Note that java version 180 java 80 hellip Java(TM) SE Runtime Environment (build 8067 hellip JRE 8067 Example from Windows Cgt java -version java version 180 Java(TM) SE Runtime Environment (build pwa6480sr4fp2-20170322_01(SR4 FP2)) IBM J9 VM (build 28 JRE 180 Windows 10 amd64-64 Compressed References 20170314_340265 (JIT enabled AOT enabled) J9VM - R28_20170314_2309_B340265 JIT - trr14javagreen_20170314_134138 GC - R28_20170314_2309_B340265_CMPRSS J9CL - 20170314_340265) JCL - 20170318_01 based on Oracle jdk8u121-b13 Example from Linux $ java -version java version 180_241 Java(TM) SE Runtime Environment (build 8067 - pxa6480sr6fp7-20200312_01(SR6 FP7)) IBM J9 VM (build 29 JRE 180 Linux amd64-64-Bit Compressed References 20200219_440062 (JIT enabled AOT enabled) OpenJ9 - 3088245 OMR - eb95a4d IBM - 83517b6) JCL - 20200310_01 based on Oracle jdk8u241-b07

Page 5 of 26

4 ++ Typical problem when customer compiles code at one version and tries to run in another Unsupported majorminor The Java Runtime Environment (JRE) is backward compatible with older versions Thus the JRE 15 can run Java programs compiled at 14 BUT the JRE 14 CANNOT run Java programs compiled at 15 Unfortunately the runtime error is super geeky Unsupported majorminor For more details see the following technote httpswwwibmcomsupportpagesnode157337 Runtime Java error Unsupported majorminor - UnsupportedClassVersionError Problem You are trying to run in a system that has a runtime OLD version of Java (such as 14 which is called the minor version) a Java class file that was compiled under a NEW version of Java (such as 15 which is called the major version) thus the error message

Page 6 of 26

5 ++ MQ provides 2 different sets of jar files MQ Classes for Java and MQ Classes for JMS + Major rework on the MQ Classes for Java and MQ Classes for JMS in MQ 70 Prior to MQ 70 the classes for Java and JMS were combined which resulted in confusion by many customers A major rework was done in MQ 70 and there is a clean split between MQ Classes for Java MQ Classes for JMS

The vast majority of the MQ customers are using MQ Classes for JMS

- MQ Classes for Java =gt few customers use it (it is STABILIZED) This code is NOT optimized for messaging It is still possible to use MQ APIs for connecting

opening a queue putting a message etc The MQ API is NOT portable with other Java messaging providers httpwwwibmcomsupportknowledgecenterenSSFKSJ_900comibmmqprodocq

127140_htm Deprecated stabilized and removed features Version 900 A number of features are deprecated stabilized or removed from IBMreg MQ Version 90 bull Stabilization of IBM MQ classes for Java ==gt instead use MQ classes for JMS

This means that NO new features or improvements will be done Instead any new features or improvements will be done with ldquoMQ Classes for JMSrdquo - MQ Classes for JMS =gt most customers are using it JMS is Java That is it is NOT a different program language JMS means ldquoJava Messaging Servicerdquo and it is a Standard in the industry MQ supports JMS 10 11 and 20 MQ 80 introduced the support for MQ 20 There are many JMS messaging providers It is optimized for messaging

+ How to distinguish when a user is using Java or JMS Ask the customer to look into the ldquoimportrdquo section in the source code in the java for their MQ client application If there are entries that have ldquojmsrdquo in them then they are using JMS such as import javaxjmsConnection

Or if the error message includes strings with ldquojmsrdquo

Page 7 of 26

6 ++ MQ provides both the Java Runtime Environment (JRE) and the MQ Java Development Toolit (JDK) MQ provides the JRE as an optional component to install in order to run some Java-base GUI utililities such as the MQ Explorer and the GSKit tools MQ provides the MQ JDK inside the overall component of ldquoMQ Software Development Kit (SDK)rdquo in order for customers to compile and link MQ client applications for Java or JMS MQ does NOT include the full Java SDK Customers need to download and install it The Java SDK command to compile code is javac The utility ldquojavacrdquo is NOT provided by MQ but it is provided by the full Java SDK

Page 8 of 26

7 ++ What levels of the JRE are shipped with MQ This article provides the details on the levels of GSKit JRE IBM Security Directory Server Client and WebSphere Application Server Liberty profile included with various maintenance levels of IBM MQ httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ

For example IBM MQ 92 Long Term Support GSKit Level JRE Level IBM Security WebSphere

Directory Application

Server Client Server

Level Liberty

profile

9203 (Windows Linux AIX) 805524 80631 64023 21006

9202 (Windows Linux AIX) 805521 80626 64022 200012

9201 (Windows Linux AIX) 805517 80615 64020 20006

9200 (Windows Linux AIX) 805516 80610 64020 20003

Page 9 of 26

8 ++ How do the MQ requirements specify the supported Java versions Letrsquos start with the obvious If MQ ships a specific level of the JRE the MQ supports it It is also the level that the MQ Development team has tested the MQ fix pack httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ BUT hellip due to the compatibility nature of Java it is possible for customers to run applications with a different level of the JRE The levels and types of the JRE that are supported are mentioned in httpswwwibmcomsupportpagesnode318077 System Requirements for IBM MQ For example from the table follow the links for IBM MQ Version 92 IBM MQ LTS and CD Releases You will land at httpswwwibmcomsupportpagessystem-requirements-ibm-mq-92 System Requirements for IBM MQ 92 For example from the table follow the links for IBM MQ 92 LTS By Operating System Linux You will land at httpswwwibmcomsoftwarereportscompatibilityclarity-reportsreporthtmlsoftwareReqsForProductdeliverableId=0A8B49C00A0B11EABCF401BE73544226amposPlatforms=LinuxampduComponentIds=D005|S011|S006|S010|S008|S007|S009|A004|A003|A001|A002ampmandatoryCapIds=16ampoptionalCapIds=30|341|47|12|9|1|25|20|28|184|185|70|16|15|26 IBM MQ 92 Detailed System Requirements 9203 maintenance level

Page 10 of 26

Select the tab Supported Software Select the section Java Java Except on zOS and IBM I the following IBM MQ product components only support the Java runtime packaged with them The Java runtime cannot be changed AMQP Service MQ Queue Manager MQ Telemetry Server MQ Managed File Transfer Service MQ Managed File Transfer Agent On zOS and IBM I the Java runtime is a prerequisite and the supported versions are described below Note that the MQ Queue Manager components includes the mqweb server component For the MQ Java and JMS clients the Java support is the same whether the connection is over TCPIP or via local bindings AdoptOpenJDK with OpenJ9 JVM

11 and future fix packs IBM Runtime Environment Java Technology Edition

8 and future fix packs 801 and future fix packs 8041 and future fix packs 8050 and future fix packs 8060 and future fix packs Oracle Java SDKJREJDK

80 and future fix packs 1101 and future fix packs Remember that when you use ldquojava -versionrdquo you will see something like java 18 (instead of version 8) You have to ldquoremoverdquo the ldquo1rdquo in order to find out the version

Page 11 of 26

9 ++ About AdoptOpenJDK and OpenJDK MQ 915 CD supports AdoptOpenJDK version 11 and later MQ 92 also supports AdoptOpenJDK version 11 and later The terminology is a bit confusing though The system requirements for MQ are very specific about supporting AdoptOpenJDK which is (see item ldquo1drdquo) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by community (open source licensed) MQ does NOT support ldquoOpenJDKrdquo (using the strict definition of the term ldquo1crdquo) Please note that the following specific term is NOT included in our supported requirements OpenJDK has a very specific meaning prebuilt OpenJDK binaries maintained by Oracle Notes - MQ 914 CD and earlier CDs do NOT support AdoptOpenJDK - MQ 910x LTS (such as 9105) do NOT support AdoptOpenJDK - MQ 90x LTSCD do NOT support AdoptOpenJDK + Difference between OpenJDK and AdoptOpenJDK httpsstackoverflowcomquestions52431764difference-between-openjdk-and-adoptopenjdk In short 1) OpenJDK has multiple meanings and can refer to 1a) free and open source implementation of the Java Platform Standard Edition (Java SE) 1b) open source repository mdash the Java source code aka OpenJDK project 1c) prebuilt OpenJDK binaries maintained by Oracle 1d) prebuilt OpenJDK binaries maintained by the OpenJDK community (open source licensed) =gt AdoptOpenJDK 2) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by OpenJDK community (open source licensed) This is the same as 1d above

Page 12 of 26

10 ++ How to download the MQ Classes for Java and MQ Classes for JMS There are several ways for a customer to get the MQ Classes for Java and MQ Classes for JMS There are several factors to take into account - Is there plenty of disk space Or very limited disk available - Are they using an application server such as JBoss or WebLogic - Is the customer developing an MQ client application which will be packaged in such a way that the MQ jar files will be included (This is the MQ Redistributable package which avoids the end user to download the MQ jar files) Please see the following VERY COMPREHENSIVE article which has a table comparing the different methods httpswwwibmcomsupportpagesnode597665 Installation scenarios for MQ 80 and 90 in Linux and Windows Key concepts - Redistributable distribute the runtime with an application both inside and outside of your environment - Relocatable put the files somewhere else other than a fixed default location + MQ Server media Must download from IBM Passport Advantage From IBM Passport Advantage you can download the manufacturing refresh MQ 9202 LTS that includes 9200 + 9201 + 9202 httpswwwibmcomsoftwarepassportadvantagepao_customerhtml search for Part Number CC9S0ML Description IBM MQ 9202 Long Term Support Release for Linux on x86 64-bit eImage Linux Filename IBM_MQ_9202_LINUX_X86-64targz CC9S4ML Description IBM MQ 9202 Long Term Support Release for Windows 64-bit elmage Windows Filename IBM_MQ_9202_WINDOWSzip CC9RWML Description IBM MQ 9202 Long Term Support Release for AIX eImage This option is very easy but requires plenty of disk space It is installed by user ldquorootrdquo Administrator The installation uses the OS facilities and the OS knows that MQ is installed It does not include the ldquoRedistributablerdquo jar files

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 3 of 26

2 ++ Example of MQ interim fixes for C-based and for JavaJMS C-language applications are faster than JavaJMS because they are compiled and linked ldquonativelyrdquo using the Operating System and the appropriate platformhardware APIs The disadvantage is that the C source code has to be compiled and linked for EVERY Operating System and Hardware For example httpl3hursleyibmcomcgi-binViewPRBplstandard6967prbampIT30409 IT30409 The dmpmqcfg utility reports timeout errors (6967prb) Platforms AIXHP-UXLinuxOS400SolarisWindows Fixes 80013-WS-MQ-AIXPPC64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-Linux_z64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-LinuxX64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-SolarisSparc64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-SolarisX64-LAIT30409html - Click to view README andor download fix 80013-WS-MQ-Win64-LAIT30409html - Click to view README andor download fix IT30409-IBMi-80013zip - Click to download fix with README 9009-WS-MQ-AIXPPC64-LAIT30409html - Click to view README andor download fix 9009-WS-MQ-LinuxX64-LAIT30409html - Click to view README andor download fix 9009-WS-MQ-SolarisSparc64-LAIT30409html - Click to view README andor download fix 9009-WS-MQ-SolarisX64-LAIT30409html - Click to view README andor download fix 9009-WS-MQ-Win64-LAIT30409html - Click to view README andor download fix On the other hand the source code for JavaJMS (extension java) is compiled into a portable ldquoByteCoderdquo (binary with extension class) Then this ByteCode is fed into the Java Virtual Machine that runs with the Operating System Hardware and it is run there This gives the advantage that JavaJMS applications ldquoare compiled once and run everywhererdquo For example httpl3hursleyibmcomcgi-binViewPRBpl7100 IT36701 - MQ-JMS poison message handling fails in compatibility mode when consuming from EBCDIC queue manager (7100prb) Platforms AIXHP-UXLinuxSolarisWindows Fixes 9210-WS-MQ-JavaVM-IT36701zip - iFix for MQ classes for JMS v921 CD 9202-WS-MQ-JavaVM-IT36701zip - iFix for MQ classes for JMS v9202 LTS 9203-WS-MQ-JavaVM-IT36701zip - iFix for MQ classes for JMS v9203 LTS

Page 4 of 26

3 ++ How Java Versions are named Originally it started like this Java 11 Java 12 hellip Java 17 Java 18 But the company (Sun) that maintained Java decided to introduce an alias that remove the ldquo1xrdquo which means Java 17 =gt also known as Java 7 Java 18 =gt also known as Java 8 + Output of the command java -version Note that java version 180 java 80 hellip Java(TM) SE Runtime Environment (build 8067 hellip JRE 8067 Example from Windows Cgt java -version java version 180 Java(TM) SE Runtime Environment (build pwa6480sr4fp2-20170322_01(SR4 FP2)) IBM J9 VM (build 28 JRE 180 Windows 10 amd64-64 Compressed References 20170314_340265 (JIT enabled AOT enabled) J9VM - R28_20170314_2309_B340265 JIT - trr14javagreen_20170314_134138 GC - R28_20170314_2309_B340265_CMPRSS J9CL - 20170314_340265) JCL - 20170318_01 based on Oracle jdk8u121-b13 Example from Linux $ java -version java version 180_241 Java(TM) SE Runtime Environment (build 8067 - pxa6480sr6fp7-20200312_01(SR6 FP7)) IBM J9 VM (build 29 JRE 180 Linux amd64-64-Bit Compressed References 20200219_440062 (JIT enabled AOT enabled) OpenJ9 - 3088245 OMR - eb95a4d IBM - 83517b6) JCL - 20200310_01 based on Oracle jdk8u241-b07

Page 5 of 26

4 ++ Typical problem when customer compiles code at one version and tries to run in another Unsupported majorminor The Java Runtime Environment (JRE) is backward compatible with older versions Thus the JRE 15 can run Java programs compiled at 14 BUT the JRE 14 CANNOT run Java programs compiled at 15 Unfortunately the runtime error is super geeky Unsupported majorminor For more details see the following technote httpswwwibmcomsupportpagesnode157337 Runtime Java error Unsupported majorminor - UnsupportedClassVersionError Problem You are trying to run in a system that has a runtime OLD version of Java (such as 14 which is called the minor version) a Java class file that was compiled under a NEW version of Java (such as 15 which is called the major version) thus the error message

Page 6 of 26

5 ++ MQ provides 2 different sets of jar files MQ Classes for Java and MQ Classes for JMS + Major rework on the MQ Classes for Java and MQ Classes for JMS in MQ 70 Prior to MQ 70 the classes for Java and JMS were combined which resulted in confusion by many customers A major rework was done in MQ 70 and there is a clean split between MQ Classes for Java MQ Classes for JMS

The vast majority of the MQ customers are using MQ Classes for JMS

- MQ Classes for Java =gt few customers use it (it is STABILIZED) This code is NOT optimized for messaging It is still possible to use MQ APIs for connecting

opening a queue putting a message etc The MQ API is NOT portable with other Java messaging providers httpwwwibmcomsupportknowledgecenterenSSFKSJ_900comibmmqprodocq

127140_htm Deprecated stabilized and removed features Version 900 A number of features are deprecated stabilized or removed from IBMreg MQ Version 90 bull Stabilization of IBM MQ classes for Java ==gt instead use MQ classes for JMS

This means that NO new features or improvements will be done Instead any new features or improvements will be done with ldquoMQ Classes for JMSrdquo - MQ Classes for JMS =gt most customers are using it JMS is Java That is it is NOT a different program language JMS means ldquoJava Messaging Servicerdquo and it is a Standard in the industry MQ supports JMS 10 11 and 20 MQ 80 introduced the support for MQ 20 There are many JMS messaging providers It is optimized for messaging

+ How to distinguish when a user is using Java or JMS Ask the customer to look into the ldquoimportrdquo section in the source code in the java for their MQ client application If there are entries that have ldquojmsrdquo in them then they are using JMS such as import javaxjmsConnection

Or if the error message includes strings with ldquojmsrdquo

Page 7 of 26

6 ++ MQ provides both the Java Runtime Environment (JRE) and the MQ Java Development Toolit (JDK) MQ provides the JRE as an optional component to install in order to run some Java-base GUI utililities such as the MQ Explorer and the GSKit tools MQ provides the MQ JDK inside the overall component of ldquoMQ Software Development Kit (SDK)rdquo in order for customers to compile and link MQ client applications for Java or JMS MQ does NOT include the full Java SDK Customers need to download and install it The Java SDK command to compile code is javac The utility ldquojavacrdquo is NOT provided by MQ but it is provided by the full Java SDK

Page 8 of 26

7 ++ What levels of the JRE are shipped with MQ This article provides the details on the levels of GSKit JRE IBM Security Directory Server Client and WebSphere Application Server Liberty profile included with various maintenance levels of IBM MQ httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ

For example IBM MQ 92 Long Term Support GSKit Level JRE Level IBM Security WebSphere

Directory Application

Server Client Server

Level Liberty

profile

9203 (Windows Linux AIX) 805524 80631 64023 21006

9202 (Windows Linux AIX) 805521 80626 64022 200012

9201 (Windows Linux AIX) 805517 80615 64020 20006

9200 (Windows Linux AIX) 805516 80610 64020 20003

Page 9 of 26

8 ++ How do the MQ requirements specify the supported Java versions Letrsquos start with the obvious If MQ ships a specific level of the JRE the MQ supports it It is also the level that the MQ Development team has tested the MQ fix pack httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ BUT hellip due to the compatibility nature of Java it is possible for customers to run applications with a different level of the JRE The levels and types of the JRE that are supported are mentioned in httpswwwibmcomsupportpagesnode318077 System Requirements for IBM MQ For example from the table follow the links for IBM MQ Version 92 IBM MQ LTS and CD Releases You will land at httpswwwibmcomsupportpagessystem-requirements-ibm-mq-92 System Requirements for IBM MQ 92 For example from the table follow the links for IBM MQ 92 LTS By Operating System Linux You will land at httpswwwibmcomsoftwarereportscompatibilityclarity-reportsreporthtmlsoftwareReqsForProductdeliverableId=0A8B49C00A0B11EABCF401BE73544226amposPlatforms=LinuxampduComponentIds=D005|S011|S006|S010|S008|S007|S009|A004|A003|A001|A002ampmandatoryCapIds=16ampoptionalCapIds=30|341|47|12|9|1|25|20|28|184|185|70|16|15|26 IBM MQ 92 Detailed System Requirements 9203 maintenance level

Page 10 of 26

Select the tab Supported Software Select the section Java Java Except on zOS and IBM I the following IBM MQ product components only support the Java runtime packaged with them The Java runtime cannot be changed AMQP Service MQ Queue Manager MQ Telemetry Server MQ Managed File Transfer Service MQ Managed File Transfer Agent On zOS and IBM I the Java runtime is a prerequisite and the supported versions are described below Note that the MQ Queue Manager components includes the mqweb server component For the MQ Java and JMS clients the Java support is the same whether the connection is over TCPIP or via local bindings AdoptOpenJDK with OpenJ9 JVM

11 and future fix packs IBM Runtime Environment Java Technology Edition

8 and future fix packs 801 and future fix packs 8041 and future fix packs 8050 and future fix packs 8060 and future fix packs Oracle Java SDKJREJDK

80 and future fix packs 1101 and future fix packs Remember that when you use ldquojava -versionrdquo you will see something like java 18 (instead of version 8) You have to ldquoremoverdquo the ldquo1rdquo in order to find out the version

Page 11 of 26

9 ++ About AdoptOpenJDK and OpenJDK MQ 915 CD supports AdoptOpenJDK version 11 and later MQ 92 also supports AdoptOpenJDK version 11 and later The terminology is a bit confusing though The system requirements for MQ are very specific about supporting AdoptOpenJDK which is (see item ldquo1drdquo) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by community (open source licensed) MQ does NOT support ldquoOpenJDKrdquo (using the strict definition of the term ldquo1crdquo) Please note that the following specific term is NOT included in our supported requirements OpenJDK has a very specific meaning prebuilt OpenJDK binaries maintained by Oracle Notes - MQ 914 CD and earlier CDs do NOT support AdoptOpenJDK - MQ 910x LTS (such as 9105) do NOT support AdoptOpenJDK - MQ 90x LTSCD do NOT support AdoptOpenJDK + Difference between OpenJDK and AdoptOpenJDK httpsstackoverflowcomquestions52431764difference-between-openjdk-and-adoptopenjdk In short 1) OpenJDK has multiple meanings and can refer to 1a) free and open source implementation of the Java Platform Standard Edition (Java SE) 1b) open source repository mdash the Java source code aka OpenJDK project 1c) prebuilt OpenJDK binaries maintained by Oracle 1d) prebuilt OpenJDK binaries maintained by the OpenJDK community (open source licensed) =gt AdoptOpenJDK 2) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by OpenJDK community (open source licensed) This is the same as 1d above

Page 12 of 26

10 ++ How to download the MQ Classes for Java and MQ Classes for JMS There are several ways for a customer to get the MQ Classes for Java and MQ Classes for JMS There are several factors to take into account - Is there plenty of disk space Or very limited disk available - Are they using an application server such as JBoss or WebLogic - Is the customer developing an MQ client application which will be packaged in such a way that the MQ jar files will be included (This is the MQ Redistributable package which avoids the end user to download the MQ jar files) Please see the following VERY COMPREHENSIVE article which has a table comparing the different methods httpswwwibmcomsupportpagesnode597665 Installation scenarios for MQ 80 and 90 in Linux and Windows Key concepts - Redistributable distribute the runtime with an application both inside and outside of your environment - Relocatable put the files somewhere else other than a fixed default location + MQ Server media Must download from IBM Passport Advantage From IBM Passport Advantage you can download the manufacturing refresh MQ 9202 LTS that includes 9200 + 9201 + 9202 httpswwwibmcomsoftwarepassportadvantagepao_customerhtml search for Part Number CC9S0ML Description IBM MQ 9202 Long Term Support Release for Linux on x86 64-bit eImage Linux Filename IBM_MQ_9202_LINUX_X86-64targz CC9S4ML Description IBM MQ 9202 Long Term Support Release for Windows 64-bit elmage Windows Filename IBM_MQ_9202_WINDOWSzip CC9RWML Description IBM MQ 9202 Long Term Support Release for AIX eImage This option is very easy but requires plenty of disk space It is installed by user ldquorootrdquo Administrator The installation uses the OS facilities and the OS knows that MQ is installed It does not include the ldquoRedistributablerdquo jar files

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 4 of 26

3 ++ How Java Versions are named Originally it started like this Java 11 Java 12 hellip Java 17 Java 18 But the company (Sun) that maintained Java decided to introduce an alias that remove the ldquo1xrdquo which means Java 17 =gt also known as Java 7 Java 18 =gt also known as Java 8 + Output of the command java -version Note that java version 180 java 80 hellip Java(TM) SE Runtime Environment (build 8067 hellip JRE 8067 Example from Windows Cgt java -version java version 180 Java(TM) SE Runtime Environment (build pwa6480sr4fp2-20170322_01(SR4 FP2)) IBM J9 VM (build 28 JRE 180 Windows 10 amd64-64 Compressed References 20170314_340265 (JIT enabled AOT enabled) J9VM - R28_20170314_2309_B340265 JIT - trr14javagreen_20170314_134138 GC - R28_20170314_2309_B340265_CMPRSS J9CL - 20170314_340265) JCL - 20170318_01 based on Oracle jdk8u121-b13 Example from Linux $ java -version java version 180_241 Java(TM) SE Runtime Environment (build 8067 - pxa6480sr6fp7-20200312_01(SR6 FP7)) IBM J9 VM (build 29 JRE 180 Linux amd64-64-Bit Compressed References 20200219_440062 (JIT enabled AOT enabled) OpenJ9 - 3088245 OMR - eb95a4d IBM - 83517b6) JCL - 20200310_01 based on Oracle jdk8u241-b07

Page 5 of 26

4 ++ Typical problem when customer compiles code at one version and tries to run in another Unsupported majorminor The Java Runtime Environment (JRE) is backward compatible with older versions Thus the JRE 15 can run Java programs compiled at 14 BUT the JRE 14 CANNOT run Java programs compiled at 15 Unfortunately the runtime error is super geeky Unsupported majorminor For more details see the following technote httpswwwibmcomsupportpagesnode157337 Runtime Java error Unsupported majorminor - UnsupportedClassVersionError Problem You are trying to run in a system that has a runtime OLD version of Java (such as 14 which is called the minor version) a Java class file that was compiled under a NEW version of Java (such as 15 which is called the major version) thus the error message

Page 6 of 26

5 ++ MQ provides 2 different sets of jar files MQ Classes for Java and MQ Classes for JMS + Major rework on the MQ Classes for Java and MQ Classes for JMS in MQ 70 Prior to MQ 70 the classes for Java and JMS were combined which resulted in confusion by many customers A major rework was done in MQ 70 and there is a clean split between MQ Classes for Java MQ Classes for JMS

The vast majority of the MQ customers are using MQ Classes for JMS

- MQ Classes for Java =gt few customers use it (it is STABILIZED) This code is NOT optimized for messaging It is still possible to use MQ APIs for connecting

opening a queue putting a message etc The MQ API is NOT portable with other Java messaging providers httpwwwibmcomsupportknowledgecenterenSSFKSJ_900comibmmqprodocq

127140_htm Deprecated stabilized and removed features Version 900 A number of features are deprecated stabilized or removed from IBMreg MQ Version 90 bull Stabilization of IBM MQ classes for Java ==gt instead use MQ classes for JMS

This means that NO new features or improvements will be done Instead any new features or improvements will be done with ldquoMQ Classes for JMSrdquo - MQ Classes for JMS =gt most customers are using it JMS is Java That is it is NOT a different program language JMS means ldquoJava Messaging Servicerdquo and it is a Standard in the industry MQ supports JMS 10 11 and 20 MQ 80 introduced the support for MQ 20 There are many JMS messaging providers It is optimized for messaging

+ How to distinguish when a user is using Java or JMS Ask the customer to look into the ldquoimportrdquo section in the source code in the java for their MQ client application If there are entries that have ldquojmsrdquo in them then they are using JMS such as import javaxjmsConnection

Or if the error message includes strings with ldquojmsrdquo

Page 7 of 26

6 ++ MQ provides both the Java Runtime Environment (JRE) and the MQ Java Development Toolit (JDK) MQ provides the JRE as an optional component to install in order to run some Java-base GUI utililities such as the MQ Explorer and the GSKit tools MQ provides the MQ JDK inside the overall component of ldquoMQ Software Development Kit (SDK)rdquo in order for customers to compile and link MQ client applications for Java or JMS MQ does NOT include the full Java SDK Customers need to download and install it The Java SDK command to compile code is javac The utility ldquojavacrdquo is NOT provided by MQ but it is provided by the full Java SDK

Page 8 of 26

7 ++ What levels of the JRE are shipped with MQ This article provides the details on the levels of GSKit JRE IBM Security Directory Server Client and WebSphere Application Server Liberty profile included with various maintenance levels of IBM MQ httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ

For example IBM MQ 92 Long Term Support GSKit Level JRE Level IBM Security WebSphere

Directory Application

Server Client Server

Level Liberty

profile

9203 (Windows Linux AIX) 805524 80631 64023 21006

9202 (Windows Linux AIX) 805521 80626 64022 200012

9201 (Windows Linux AIX) 805517 80615 64020 20006

9200 (Windows Linux AIX) 805516 80610 64020 20003

Page 9 of 26

8 ++ How do the MQ requirements specify the supported Java versions Letrsquos start with the obvious If MQ ships a specific level of the JRE the MQ supports it It is also the level that the MQ Development team has tested the MQ fix pack httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ BUT hellip due to the compatibility nature of Java it is possible for customers to run applications with a different level of the JRE The levels and types of the JRE that are supported are mentioned in httpswwwibmcomsupportpagesnode318077 System Requirements for IBM MQ For example from the table follow the links for IBM MQ Version 92 IBM MQ LTS and CD Releases You will land at httpswwwibmcomsupportpagessystem-requirements-ibm-mq-92 System Requirements for IBM MQ 92 For example from the table follow the links for IBM MQ 92 LTS By Operating System Linux You will land at httpswwwibmcomsoftwarereportscompatibilityclarity-reportsreporthtmlsoftwareReqsForProductdeliverableId=0A8B49C00A0B11EABCF401BE73544226amposPlatforms=LinuxampduComponentIds=D005|S011|S006|S010|S008|S007|S009|A004|A003|A001|A002ampmandatoryCapIds=16ampoptionalCapIds=30|341|47|12|9|1|25|20|28|184|185|70|16|15|26 IBM MQ 92 Detailed System Requirements 9203 maintenance level

Page 10 of 26

Select the tab Supported Software Select the section Java Java Except on zOS and IBM I the following IBM MQ product components only support the Java runtime packaged with them The Java runtime cannot be changed AMQP Service MQ Queue Manager MQ Telemetry Server MQ Managed File Transfer Service MQ Managed File Transfer Agent On zOS and IBM I the Java runtime is a prerequisite and the supported versions are described below Note that the MQ Queue Manager components includes the mqweb server component For the MQ Java and JMS clients the Java support is the same whether the connection is over TCPIP or via local bindings AdoptOpenJDK with OpenJ9 JVM

11 and future fix packs IBM Runtime Environment Java Technology Edition

8 and future fix packs 801 and future fix packs 8041 and future fix packs 8050 and future fix packs 8060 and future fix packs Oracle Java SDKJREJDK

80 and future fix packs 1101 and future fix packs Remember that when you use ldquojava -versionrdquo you will see something like java 18 (instead of version 8) You have to ldquoremoverdquo the ldquo1rdquo in order to find out the version

Page 11 of 26

9 ++ About AdoptOpenJDK and OpenJDK MQ 915 CD supports AdoptOpenJDK version 11 and later MQ 92 also supports AdoptOpenJDK version 11 and later The terminology is a bit confusing though The system requirements for MQ are very specific about supporting AdoptOpenJDK which is (see item ldquo1drdquo) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by community (open source licensed) MQ does NOT support ldquoOpenJDKrdquo (using the strict definition of the term ldquo1crdquo) Please note that the following specific term is NOT included in our supported requirements OpenJDK has a very specific meaning prebuilt OpenJDK binaries maintained by Oracle Notes - MQ 914 CD and earlier CDs do NOT support AdoptOpenJDK - MQ 910x LTS (such as 9105) do NOT support AdoptOpenJDK - MQ 90x LTSCD do NOT support AdoptOpenJDK + Difference between OpenJDK and AdoptOpenJDK httpsstackoverflowcomquestions52431764difference-between-openjdk-and-adoptopenjdk In short 1) OpenJDK has multiple meanings and can refer to 1a) free and open source implementation of the Java Platform Standard Edition (Java SE) 1b) open source repository mdash the Java source code aka OpenJDK project 1c) prebuilt OpenJDK binaries maintained by Oracle 1d) prebuilt OpenJDK binaries maintained by the OpenJDK community (open source licensed) =gt AdoptOpenJDK 2) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by OpenJDK community (open source licensed) This is the same as 1d above

Page 12 of 26

10 ++ How to download the MQ Classes for Java and MQ Classes for JMS There are several ways for a customer to get the MQ Classes for Java and MQ Classes for JMS There are several factors to take into account - Is there plenty of disk space Or very limited disk available - Are they using an application server such as JBoss or WebLogic - Is the customer developing an MQ client application which will be packaged in such a way that the MQ jar files will be included (This is the MQ Redistributable package which avoids the end user to download the MQ jar files) Please see the following VERY COMPREHENSIVE article which has a table comparing the different methods httpswwwibmcomsupportpagesnode597665 Installation scenarios for MQ 80 and 90 in Linux and Windows Key concepts - Redistributable distribute the runtime with an application both inside and outside of your environment - Relocatable put the files somewhere else other than a fixed default location + MQ Server media Must download from IBM Passport Advantage From IBM Passport Advantage you can download the manufacturing refresh MQ 9202 LTS that includes 9200 + 9201 + 9202 httpswwwibmcomsoftwarepassportadvantagepao_customerhtml search for Part Number CC9S0ML Description IBM MQ 9202 Long Term Support Release for Linux on x86 64-bit eImage Linux Filename IBM_MQ_9202_LINUX_X86-64targz CC9S4ML Description IBM MQ 9202 Long Term Support Release for Windows 64-bit elmage Windows Filename IBM_MQ_9202_WINDOWSzip CC9RWML Description IBM MQ 9202 Long Term Support Release for AIX eImage This option is very easy but requires plenty of disk space It is installed by user ldquorootrdquo Administrator The installation uses the OS facilities and the OS knows that MQ is installed It does not include the ldquoRedistributablerdquo jar files

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 5 of 26

4 ++ Typical problem when customer compiles code at one version and tries to run in another Unsupported majorminor The Java Runtime Environment (JRE) is backward compatible with older versions Thus the JRE 15 can run Java programs compiled at 14 BUT the JRE 14 CANNOT run Java programs compiled at 15 Unfortunately the runtime error is super geeky Unsupported majorminor For more details see the following technote httpswwwibmcomsupportpagesnode157337 Runtime Java error Unsupported majorminor - UnsupportedClassVersionError Problem You are trying to run in a system that has a runtime OLD version of Java (such as 14 which is called the minor version) a Java class file that was compiled under a NEW version of Java (such as 15 which is called the major version) thus the error message

Page 6 of 26

5 ++ MQ provides 2 different sets of jar files MQ Classes for Java and MQ Classes for JMS + Major rework on the MQ Classes for Java and MQ Classes for JMS in MQ 70 Prior to MQ 70 the classes for Java and JMS were combined which resulted in confusion by many customers A major rework was done in MQ 70 and there is a clean split between MQ Classes for Java MQ Classes for JMS

The vast majority of the MQ customers are using MQ Classes for JMS

- MQ Classes for Java =gt few customers use it (it is STABILIZED) This code is NOT optimized for messaging It is still possible to use MQ APIs for connecting

opening a queue putting a message etc The MQ API is NOT portable with other Java messaging providers httpwwwibmcomsupportknowledgecenterenSSFKSJ_900comibmmqprodocq

127140_htm Deprecated stabilized and removed features Version 900 A number of features are deprecated stabilized or removed from IBMreg MQ Version 90 bull Stabilization of IBM MQ classes for Java ==gt instead use MQ classes for JMS

This means that NO new features or improvements will be done Instead any new features or improvements will be done with ldquoMQ Classes for JMSrdquo - MQ Classes for JMS =gt most customers are using it JMS is Java That is it is NOT a different program language JMS means ldquoJava Messaging Servicerdquo and it is a Standard in the industry MQ supports JMS 10 11 and 20 MQ 80 introduced the support for MQ 20 There are many JMS messaging providers It is optimized for messaging

+ How to distinguish when a user is using Java or JMS Ask the customer to look into the ldquoimportrdquo section in the source code in the java for their MQ client application If there are entries that have ldquojmsrdquo in them then they are using JMS such as import javaxjmsConnection

Or if the error message includes strings with ldquojmsrdquo

Page 7 of 26

6 ++ MQ provides both the Java Runtime Environment (JRE) and the MQ Java Development Toolit (JDK) MQ provides the JRE as an optional component to install in order to run some Java-base GUI utililities such as the MQ Explorer and the GSKit tools MQ provides the MQ JDK inside the overall component of ldquoMQ Software Development Kit (SDK)rdquo in order for customers to compile and link MQ client applications for Java or JMS MQ does NOT include the full Java SDK Customers need to download and install it The Java SDK command to compile code is javac The utility ldquojavacrdquo is NOT provided by MQ but it is provided by the full Java SDK

Page 8 of 26

7 ++ What levels of the JRE are shipped with MQ This article provides the details on the levels of GSKit JRE IBM Security Directory Server Client and WebSphere Application Server Liberty profile included with various maintenance levels of IBM MQ httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ

For example IBM MQ 92 Long Term Support GSKit Level JRE Level IBM Security WebSphere

Directory Application

Server Client Server

Level Liberty

profile

9203 (Windows Linux AIX) 805524 80631 64023 21006

9202 (Windows Linux AIX) 805521 80626 64022 200012

9201 (Windows Linux AIX) 805517 80615 64020 20006

9200 (Windows Linux AIX) 805516 80610 64020 20003

Page 9 of 26

8 ++ How do the MQ requirements specify the supported Java versions Letrsquos start with the obvious If MQ ships a specific level of the JRE the MQ supports it It is also the level that the MQ Development team has tested the MQ fix pack httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ BUT hellip due to the compatibility nature of Java it is possible for customers to run applications with a different level of the JRE The levels and types of the JRE that are supported are mentioned in httpswwwibmcomsupportpagesnode318077 System Requirements for IBM MQ For example from the table follow the links for IBM MQ Version 92 IBM MQ LTS and CD Releases You will land at httpswwwibmcomsupportpagessystem-requirements-ibm-mq-92 System Requirements for IBM MQ 92 For example from the table follow the links for IBM MQ 92 LTS By Operating System Linux You will land at httpswwwibmcomsoftwarereportscompatibilityclarity-reportsreporthtmlsoftwareReqsForProductdeliverableId=0A8B49C00A0B11EABCF401BE73544226amposPlatforms=LinuxampduComponentIds=D005|S011|S006|S010|S008|S007|S009|A004|A003|A001|A002ampmandatoryCapIds=16ampoptionalCapIds=30|341|47|12|9|1|25|20|28|184|185|70|16|15|26 IBM MQ 92 Detailed System Requirements 9203 maintenance level

Page 10 of 26

Select the tab Supported Software Select the section Java Java Except on zOS and IBM I the following IBM MQ product components only support the Java runtime packaged with them The Java runtime cannot be changed AMQP Service MQ Queue Manager MQ Telemetry Server MQ Managed File Transfer Service MQ Managed File Transfer Agent On zOS and IBM I the Java runtime is a prerequisite and the supported versions are described below Note that the MQ Queue Manager components includes the mqweb server component For the MQ Java and JMS clients the Java support is the same whether the connection is over TCPIP or via local bindings AdoptOpenJDK with OpenJ9 JVM

11 and future fix packs IBM Runtime Environment Java Technology Edition

8 and future fix packs 801 and future fix packs 8041 and future fix packs 8050 and future fix packs 8060 and future fix packs Oracle Java SDKJREJDK

80 and future fix packs 1101 and future fix packs Remember that when you use ldquojava -versionrdquo you will see something like java 18 (instead of version 8) You have to ldquoremoverdquo the ldquo1rdquo in order to find out the version

Page 11 of 26

9 ++ About AdoptOpenJDK and OpenJDK MQ 915 CD supports AdoptOpenJDK version 11 and later MQ 92 also supports AdoptOpenJDK version 11 and later The terminology is a bit confusing though The system requirements for MQ are very specific about supporting AdoptOpenJDK which is (see item ldquo1drdquo) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by community (open source licensed) MQ does NOT support ldquoOpenJDKrdquo (using the strict definition of the term ldquo1crdquo) Please note that the following specific term is NOT included in our supported requirements OpenJDK has a very specific meaning prebuilt OpenJDK binaries maintained by Oracle Notes - MQ 914 CD and earlier CDs do NOT support AdoptOpenJDK - MQ 910x LTS (such as 9105) do NOT support AdoptOpenJDK - MQ 90x LTSCD do NOT support AdoptOpenJDK + Difference between OpenJDK and AdoptOpenJDK httpsstackoverflowcomquestions52431764difference-between-openjdk-and-adoptopenjdk In short 1) OpenJDK has multiple meanings and can refer to 1a) free and open source implementation of the Java Platform Standard Edition (Java SE) 1b) open source repository mdash the Java source code aka OpenJDK project 1c) prebuilt OpenJDK binaries maintained by Oracle 1d) prebuilt OpenJDK binaries maintained by the OpenJDK community (open source licensed) =gt AdoptOpenJDK 2) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by OpenJDK community (open source licensed) This is the same as 1d above

Page 12 of 26

10 ++ How to download the MQ Classes for Java and MQ Classes for JMS There are several ways for a customer to get the MQ Classes for Java and MQ Classes for JMS There are several factors to take into account - Is there plenty of disk space Or very limited disk available - Are they using an application server such as JBoss or WebLogic - Is the customer developing an MQ client application which will be packaged in such a way that the MQ jar files will be included (This is the MQ Redistributable package which avoids the end user to download the MQ jar files) Please see the following VERY COMPREHENSIVE article which has a table comparing the different methods httpswwwibmcomsupportpagesnode597665 Installation scenarios for MQ 80 and 90 in Linux and Windows Key concepts - Redistributable distribute the runtime with an application both inside and outside of your environment - Relocatable put the files somewhere else other than a fixed default location + MQ Server media Must download from IBM Passport Advantage From IBM Passport Advantage you can download the manufacturing refresh MQ 9202 LTS that includes 9200 + 9201 + 9202 httpswwwibmcomsoftwarepassportadvantagepao_customerhtml search for Part Number CC9S0ML Description IBM MQ 9202 Long Term Support Release for Linux on x86 64-bit eImage Linux Filename IBM_MQ_9202_LINUX_X86-64targz CC9S4ML Description IBM MQ 9202 Long Term Support Release for Windows 64-bit elmage Windows Filename IBM_MQ_9202_WINDOWSzip CC9RWML Description IBM MQ 9202 Long Term Support Release for AIX eImage This option is very easy but requires plenty of disk space It is installed by user ldquorootrdquo Administrator The installation uses the OS facilities and the OS knows that MQ is installed It does not include the ldquoRedistributablerdquo jar files

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 6 of 26

5 ++ MQ provides 2 different sets of jar files MQ Classes for Java and MQ Classes for JMS + Major rework on the MQ Classes for Java and MQ Classes for JMS in MQ 70 Prior to MQ 70 the classes for Java and JMS were combined which resulted in confusion by many customers A major rework was done in MQ 70 and there is a clean split between MQ Classes for Java MQ Classes for JMS

The vast majority of the MQ customers are using MQ Classes for JMS

- MQ Classes for Java =gt few customers use it (it is STABILIZED) This code is NOT optimized for messaging It is still possible to use MQ APIs for connecting

opening a queue putting a message etc The MQ API is NOT portable with other Java messaging providers httpwwwibmcomsupportknowledgecenterenSSFKSJ_900comibmmqprodocq

127140_htm Deprecated stabilized and removed features Version 900 A number of features are deprecated stabilized or removed from IBMreg MQ Version 90 bull Stabilization of IBM MQ classes for Java ==gt instead use MQ classes for JMS

This means that NO new features or improvements will be done Instead any new features or improvements will be done with ldquoMQ Classes for JMSrdquo - MQ Classes for JMS =gt most customers are using it JMS is Java That is it is NOT a different program language JMS means ldquoJava Messaging Servicerdquo and it is a Standard in the industry MQ supports JMS 10 11 and 20 MQ 80 introduced the support for MQ 20 There are many JMS messaging providers It is optimized for messaging

+ How to distinguish when a user is using Java or JMS Ask the customer to look into the ldquoimportrdquo section in the source code in the java for their MQ client application If there are entries that have ldquojmsrdquo in them then they are using JMS such as import javaxjmsConnection

Or if the error message includes strings with ldquojmsrdquo

Page 7 of 26

6 ++ MQ provides both the Java Runtime Environment (JRE) and the MQ Java Development Toolit (JDK) MQ provides the JRE as an optional component to install in order to run some Java-base GUI utililities such as the MQ Explorer and the GSKit tools MQ provides the MQ JDK inside the overall component of ldquoMQ Software Development Kit (SDK)rdquo in order for customers to compile and link MQ client applications for Java or JMS MQ does NOT include the full Java SDK Customers need to download and install it The Java SDK command to compile code is javac The utility ldquojavacrdquo is NOT provided by MQ but it is provided by the full Java SDK

Page 8 of 26

7 ++ What levels of the JRE are shipped with MQ This article provides the details on the levels of GSKit JRE IBM Security Directory Server Client and WebSphere Application Server Liberty profile included with various maintenance levels of IBM MQ httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ

For example IBM MQ 92 Long Term Support GSKit Level JRE Level IBM Security WebSphere

Directory Application

Server Client Server

Level Liberty

profile

9203 (Windows Linux AIX) 805524 80631 64023 21006

9202 (Windows Linux AIX) 805521 80626 64022 200012

9201 (Windows Linux AIX) 805517 80615 64020 20006

9200 (Windows Linux AIX) 805516 80610 64020 20003

Page 9 of 26

8 ++ How do the MQ requirements specify the supported Java versions Letrsquos start with the obvious If MQ ships a specific level of the JRE the MQ supports it It is also the level that the MQ Development team has tested the MQ fix pack httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ BUT hellip due to the compatibility nature of Java it is possible for customers to run applications with a different level of the JRE The levels and types of the JRE that are supported are mentioned in httpswwwibmcomsupportpagesnode318077 System Requirements for IBM MQ For example from the table follow the links for IBM MQ Version 92 IBM MQ LTS and CD Releases You will land at httpswwwibmcomsupportpagessystem-requirements-ibm-mq-92 System Requirements for IBM MQ 92 For example from the table follow the links for IBM MQ 92 LTS By Operating System Linux You will land at httpswwwibmcomsoftwarereportscompatibilityclarity-reportsreporthtmlsoftwareReqsForProductdeliverableId=0A8B49C00A0B11EABCF401BE73544226amposPlatforms=LinuxampduComponentIds=D005|S011|S006|S010|S008|S007|S009|A004|A003|A001|A002ampmandatoryCapIds=16ampoptionalCapIds=30|341|47|12|9|1|25|20|28|184|185|70|16|15|26 IBM MQ 92 Detailed System Requirements 9203 maintenance level

Page 10 of 26

Select the tab Supported Software Select the section Java Java Except on zOS and IBM I the following IBM MQ product components only support the Java runtime packaged with them The Java runtime cannot be changed AMQP Service MQ Queue Manager MQ Telemetry Server MQ Managed File Transfer Service MQ Managed File Transfer Agent On zOS and IBM I the Java runtime is a prerequisite and the supported versions are described below Note that the MQ Queue Manager components includes the mqweb server component For the MQ Java and JMS clients the Java support is the same whether the connection is over TCPIP or via local bindings AdoptOpenJDK with OpenJ9 JVM

11 and future fix packs IBM Runtime Environment Java Technology Edition

8 and future fix packs 801 and future fix packs 8041 and future fix packs 8050 and future fix packs 8060 and future fix packs Oracle Java SDKJREJDK

80 and future fix packs 1101 and future fix packs Remember that when you use ldquojava -versionrdquo you will see something like java 18 (instead of version 8) You have to ldquoremoverdquo the ldquo1rdquo in order to find out the version

Page 11 of 26

9 ++ About AdoptOpenJDK and OpenJDK MQ 915 CD supports AdoptOpenJDK version 11 and later MQ 92 also supports AdoptOpenJDK version 11 and later The terminology is a bit confusing though The system requirements for MQ are very specific about supporting AdoptOpenJDK which is (see item ldquo1drdquo) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by community (open source licensed) MQ does NOT support ldquoOpenJDKrdquo (using the strict definition of the term ldquo1crdquo) Please note that the following specific term is NOT included in our supported requirements OpenJDK has a very specific meaning prebuilt OpenJDK binaries maintained by Oracle Notes - MQ 914 CD and earlier CDs do NOT support AdoptOpenJDK - MQ 910x LTS (such as 9105) do NOT support AdoptOpenJDK - MQ 90x LTSCD do NOT support AdoptOpenJDK + Difference between OpenJDK and AdoptOpenJDK httpsstackoverflowcomquestions52431764difference-between-openjdk-and-adoptopenjdk In short 1) OpenJDK has multiple meanings and can refer to 1a) free and open source implementation of the Java Platform Standard Edition (Java SE) 1b) open source repository mdash the Java source code aka OpenJDK project 1c) prebuilt OpenJDK binaries maintained by Oracle 1d) prebuilt OpenJDK binaries maintained by the OpenJDK community (open source licensed) =gt AdoptOpenJDK 2) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by OpenJDK community (open source licensed) This is the same as 1d above

Page 12 of 26

10 ++ How to download the MQ Classes for Java and MQ Classes for JMS There are several ways for a customer to get the MQ Classes for Java and MQ Classes for JMS There are several factors to take into account - Is there plenty of disk space Or very limited disk available - Are they using an application server such as JBoss or WebLogic - Is the customer developing an MQ client application which will be packaged in such a way that the MQ jar files will be included (This is the MQ Redistributable package which avoids the end user to download the MQ jar files) Please see the following VERY COMPREHENSIVE article which has a table comparing the different methods httpswwwibmcomsupportpagesnode597665 Installation scenarios for MQ 80 and 90 in Linux and Windows Key concepts - Redistributable distribute the runtime with an application both inside and outside of your environment - Relocatable put the files somewhere else other than a fixed default location + MQ Server media Must download from IBM Passport Advantage From IBM Passport Advantage you can download the manufacturing refresh MQ 9202 LTS that includes 9200 + 9201 + 9202 httpswwwibmcomsoftwarepassportadvantagepao_customerhtml search for Part Number CC9S0ML Description IBM MQ 9202 Long Term Support Release for Linux on x86 64-bit eImage Linux Filename IBM_MQ_9202_LINUX_X86-64targz CC9S4ML Description IBM MQ 9202 Long Term Support Release for Windows 64-bit elmage Windows Filename IBM_MQ_9202_WINDOWSzip CC9RWML Description IBM MQ 9202 Long Term Support Release for AIX eImage This option is very easy but requires plenty of disk space It is installed by user ldquorootrdquo Administrator The installation uses the OS facilities and the OS knows that MQ is installed It does not include the ldquoRedistributablerdquo jar files

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 7 of 26

6 ++ MQ provides both the Java Runtime Environment (JRE) and the MQ Java Development Toolit (JDK) MQ provides the JRE as an optional component to install in order to run some Java-base GUI utililities such as the MQ Explorer and the GSKit tools MQ provides the MQ JDK inside the overall component of ldquoMQ Software Development Kit (SDK)rdquo in order for customers to compile and link MQ client applications for Java or JMS MQ does NOT include the full Java SDK Customers need to download and install it The Java SDK command to compile code is javac The utility ldquojavacrdquo is NOT provided by MQ but it is provided by the full Java SDK

Page 8 of 26

7 ++ What levels of the JRE are shipped with MQ This article provides the details on the levels of GSKit JRE IBM Security Directory Server Client and WebSphere Application Server Liberty profile included with various maintenance levels of IBM MQ httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ

For example IBM MQ 92 Long Term Support GSKit Level JRE Level IBM Security WebSphere

Directory Application

Server Client Server

Level Liberty

profile

9203 (Windows Linux AIX) 805524 80631 64023 21006

9202 (Windows Linux AIX) 805521 80626 64022 200012

9201 (Windows Linux AIX) 805517 80615 64020 20006

9200 (Windows Linux AIX) 805516 80610 64020 20003

Page 9 of 26

8 ++ How do the MQ requirements specify the supported Java versions Letrsquos start with the obvious If MQ ships a specific level of the JRE the MQ supports it It is also the level that the MQ Development team has tested the MQ fix pack httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ BUT hellip due to the compatibility nature of Java it is possible for customers to run applications with a different level of the JRE The levels and types of the JRE that are supported are mentioned in httpswwwibmcomsupportpagesnode318077 System Requirements for IBM MQ For example from the table follow the links for IBM MQ Version 92 IBM MQ LTS and CD Releases You will land at httpswwwibmcomsupportpagessystem-requirements-ibm-mq-92 System Requirements for IBM MQ 92 For example from the table follow the links for IBM MQ 92 LTS By Operating System Linux You will land at httpswwwibmcomsoftwarereportscompatibilityclarity-reportsreporthtmlsoftwareReqsForProductdeliverableId=0A8B49C00A0B11EABCF401BE73544226amposPlatforms=LinuxampduComponentIds=D005|S011|S006|S010|S008|S007|S009|A004|A003|A001|A002ampmandatoryCapIds=16ampoptionalCapIds=30|341|47|12|9|1|25|20|28|184|185|70|16|15|26 IBM MQ 92 Detailed System Requirements 9203 maintenance level

Page 10 of 26

Select the tab Supported Software Select the section Java Java Except on zOS and IBM I the following IBM MQ product components only support the Java runtime packaged with them The Java runtime cannot be changed AMQP Service MQ Queue Manager MQ Telemetry Server MQ Managed File Transfer Service MQ Managed File Transfer Agent On zOS and IBM I the Java runtime is a prerequisite and the supported versions are described below Note that the MQ Queue Manager components includes the mqweb server component For the MQ Java and JMS clients the Java support is the same whether the connection is over TCPIP or via local bindings AdoptOpenJDK with OpenJ9 JVM

11 and future fix packs IBM Runtime Environment Java Technology Edition

8 and future fix packs 801 and future fix packs 8041 and future fix packs 8050 and future fix packs 8060 and future fix packs Oracle Java SDKJREJDK

80 and future fix packs 1101 and future fix packs Remember that when you use ldquojava -versionrdquo you will see something like java 18 (instead of version 8) You have to ldquoremoverdquo the ldquo1rdquo in order to find out the version

Page 11 of 26

9 ++ About AdoptOpenJDK and OpenJDK MQ 915 CD supports AdoptOpenJDK version 11 and later MQ 92 also supports AdoptOpenJDK version 11 and later The terminology is a bit confusing though The system requirements for MQ are very specific about supporting AdoptOpenJDK which is (see item ldquo1drdquo) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by community (open source licensed) MQ does NOT support ldquoOpenJDKrdquo (using the strict definition of the term ldquo1crdquo) Please note that the following specific term is NOT included in our supported requirements OpenJDK has a very specific meaning prebuilt OpenJDK binaries maintained by Oracle Notes - MQ 914 CD and earlier CDs do NOT support AdoptOpenJDK - MQ 910x LTS (such as 9105) do NOT support AdoptOpenJDK - MQ 90x LTSCD do NOT support AdoptOpenJDK + Difference between OpenJDK and AdoptOpenJDK httpsstackoverflowcomquestions52431764difference-between-openjdk-and-adoptopenjdk In short 1) OpenJDK has multiple meanings and can refer to 1a) free and open source implementation of the Java Platform Standard Edition (Java SE) 1b) open source repository mdash the Java source code aka OpenJDK project 1c) prebuilt OpenJDK binaries maintained by Oracle 1d) prebuilt OpenJDK binaries maintained by the OpenJDK community (open source licensed) =gt AdoptOpenJDK 2) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by OpenJDK community (open source licensed) This is the same as 1d above

Page 12 of 26

10 ++ How to download the MQ Classes for Java and MQ Classes for JMS There are several ways for a customer to get the MQ Classes for Java and MQ Classes for JMS There are several factors to take into account - Is there plenty of disk space Or very limited disk available - Are they using an application server such as JBoss or WebLogic - Is the customer developing an MQ client application which will be packaged in such a way that the MQ jar files will be included (This is the MQ Redistributable package which avoids the end user to download the MQ jar files) Please see the following VERY COMPREHENSIVE article which has a table comparing the different methods httpswwwibmcomsupportpagesnode597665 Installation scenarios for MQ 80 and 90 in Linux and Windows Key concepts - Redistributable distribute the runtime with an application both inside and outside of your environment - Relocatable put the files somewhere else other than a fixed default location + MQ Server media Must download from IBM Passport Advantage From IBM Passport Advantage you can download the manufacturing refresh MQ 9202 LTS that includes 9200 + 9201 + 9202 httpswwwibmcomsoftwarepassportadvantagepao_customerhtml search for Part Number CC9S0ML Description IBM MQ 9202 Long Term Support Release for Linux on x86 64-bit eImage Linux Filename IBM_MQ_9202_LINUX_X86-64targz CC9S4ML Description IBM MQ 9202 Long Term Support Release for Windows 64-bit elmage Windows Filename IBM_MQ_9202_WINDOWSzip CC9RWML Description IBM MQ 9202 Long Term Support Release for AIX eImage This option is very easy but requires plenty of disk space It is installed by user ldquorootrdquo Administrator The installation uses the OS facilities and the OS knows that MQ is installed It does not include the ldquoRedistributablerdquo jar files

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 8 of 26

7 ++ What levels of the JRE are shipped with MQ This article provides the details on the levels of GSKit JRE IBM Security Directory Server Client and WebSphere Application Server Liberty profile included with various maintenance levels of IBM MQ httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ

For example IBM MQ 92 Long Term Support GSKit Level JRE Level IBM Security WebSphere

Directory Application

Server Client Server

Level Liberty

profile

9203 (Windows Linux AIX) 805524 80631 64023 21006

9202 (Windows Linux AIX) 805521 80626 64022 200012

9201 (Windows Linux AIX) 805517 80615 64020 20006

9200 (Windows Linux AIX) 805516 80610 64020 20003

Page 9 of 26

8 ++ How do the MQ requirements specify the supported Java versions Letrsquos start with the obvious If MQ ships a specific level of the JRE the MQ supports it It is also the level that the MQ Development team has tested the MQ fix pack httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ BUT hellip due to the compatibility nature of Java it is possible for customers to run applications with a different level of the JRE The levels and types of the JRE that are supported are mentioned in httpswwwibmcomsupportpagesnode318077 System Requirements for IBM MQ For example from the table follow the links for IBM MQ Version 92 IBM MQ LTS and CD Releases You will land at httpswwwibmcomsupportpagessystem-requirements-ibm-mq-92 System Requirements for IBM MQ 92 For example from the table follow the links for IBM MQ 92 LTS By Operating System Linux You will land at httpswwwibmcomsoftwarereportscompatibilityclarity-reportsreporthtmlsoftwareReqsForProductdeliverableId=0A8B49C00A0B11EABCF401BE73544226amposPlatforms=LinuxampduComponentIds=D005|S011|S006|S010|S008|S007|S009|A004|A003|A001|A002ampmandatoryCapIds=16ampoptionalCapIds=30|341|47|12|9|1|25|20|28|184|185|70|16|15|26 IBM MQ 92 Detailed System Requirements 9203 maintenance level

Page 10 of 26

Select the tab Supported Software Select the section Java Java Except on zOS and IBM I the following IBM MQ product components only support the Java runtime packaged with them The Java runtime cannot be changed AMQP Service MQ Queue Manager MQ Telemetry Server MQ Managed File Transfer Service MQ Managed File Transfer Agent On zOS and IBM I the Java runtime is a prerequisite and the supported versions are described below Note that the MQ Queue Manager components includes the mqweb server component For the MQ Java and JMS clients the Java support is the same whether the connection is over TCPIP or via local bindings AdoptOpenJDK with OpenJ9 JVM

11 and future fix packs IBM Runtime Environment Java Technology Edition

8 and future fix packs 801 and future fix packs 8041 and future fix packs 8050 and future fix packs 8060 and future fix packs Oracle Java SDKJREJDK

80 and future fix packs 1101 and future fix packs Remember that when you use ldquojava -versionrdquo you will see something like java 18 (instead of version 8) You have to ldquoremoverdquo the ldquo1rdquo in order to find out the version

Page 11 of 26

9 ++ About AdoptOpenJDK and OpenJDK MQ 915 CD supports AdoptOpenJDK version 11 and later MQ 92 also supports AdoptOpenJDK version 11 and later The terminology is a bit confusing though The system requirements for MQ are very specific about supporting AdoptOpenJDK which is (see item ldquo1drdquo) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by community (open source licensed) MQ does NOT support ldquoOpenJDKrdquo (using the strict definition of the term ldquo1crdquo) Please note that the following specific term is NOT included in our supported requirements OpenJDK has a very specific meaning prebuilt OpenJDK binaries maintained by Oracle Notes - MQ 914 CD and earlier CDs do NOT support AdoptOpenJDK - MQ 910x LTS (such as 9105) do NOT support AdoptOpenJDK - MQ 90x LTSCD do NOT support AdoptOpenJDK + Difference between OpenJDK and AdoptOpenJDK httpsstackoverflowcomquestions52431764difference-between-openjdk-and-adoptopenjdk In short 1) OpenJDK has multiple meanings and can refer to 1a) free and open source implementation of the Java Platform Standard Edition (Java SE) 1b) open source repository mdash the Java source code aka OpenJDK project 1c) prebuilt OpenJDK binaries maintained by Oracle 1d) prebuilt OpenJDK binaries maintained by the OpenJDK community (open source licensed) =gt AdoptOpenJDK 2) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by OpenJDK community (open source licensed) This is the same as 1d above

Page 12 of 26

10 ++ How to download the MQ Classes for Java and MQ Classes for JMS There are several ways for a customer to get the MQ Classes for Java and MQ Classes for JMS There are several factors to take into account - Is there plenty of disk space Or very limited disk available - Are they using an application server such as JBoss or WebLogic - Is the customer developing an MQ client application which will be packaged in such a way that the MQ jar files will be included (This is the MQ Redistributable package which avoids the end user to download the MQ jar files) Please see the following VERY COMPREHENSIVE article which has a table comparing the different methods httpswwwibmcomsupportpagesnode597665 Installation scenarios for MQ 80 and 90 in Linux and Windows Key concepts - Redistributable distribute the runtime with an application both inside and outside of your environment - Relocatable put the files somewhere else other than a fixed default location + MQ Server media Must download from IBM Passport Advantage From IBM Passport Advantage you can download the manufacturing refresh MQ 9202 LTS that includes 9200 + 9201 + 9202 httpswwwibmcomsoftwarepassportadvantagepao_customerhtml search for Part Number CC9S0ML Description IBM MQ 9202 Long Term Support Release for Linux on x86 64-bit eImage Linux Filename IBM_MQ_9202_LINUX_X86-64targz CC9S4ML Description IBM MQ 9202 Long Term Support Release for Windows 64-bit elmage Windows Filename IBM_MQ_9202_WINDOWSzip CC9RWML Description IBM MQ 9202 Long Term Support Release for AIX eImage This option is very easy but requires plenty of disk space It is installed by user ldquorootrdquo Administrator The installation uses the OS facilities and the OS knows that MQ is installed It does not include the ldquoRedistributablerdquo jar files

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 9 of 26

8 ++ How do the MQ requirements specify the supported Java versions Letrsquos start with the obvious If MQ ships a specific level of the JRE the MQ supports it It is also the level that the MQ Development team has tested the MQ fix pack httpswwwibmcomsupportpagesnode713049 Levels of JRE and GSkit bundled with IBM MQ BUT hellip due to the compatibility nature of Java it is possible for customers to run applications with a different level of the JRE The levels and types of the JRE that are supported are mentioned in httpswwwibmcomsupportpagesnode318077 System Requirements for IBM MQ For example from the table follow the links for IBM MQ Version 92 IBM MQ LTS and CD Releases You will land at httpswwwibmcomsupportpagessystem-requirements-ibm-mq-92 System Requirements for IBM MQ 92 For example from the table follow the links for IBM MQ 92 LTS By Operating System Linux You will land at httpswwwibmcomsoftwarereportscompatibilityclarity-reportsreporthtmlsoftwareReqsForProductdeliverableId=0A8B49C00A0B11EABCF401BE73544226amposPlatforms=LinuxampduComponentIds=D005|S011|S006|S010|S008|S007|S009|A004|A003|A001|A002ampmandatoryCapIds=16ampoptionalCapIds=30|341|47|12|9|1|25|20|28|184|185|70|16|15|26 IBM MQ 92 Detailed System Requirements 9203 maintenance level

Page 10 of 26

Select the tab Supported Software Select the section Java Java Except on zOS and IBM I the following IBM MQ product components only support the Java runtime packaged with them The Java runtime cannot be changed AMQP Service MQ Queue Manager MQ Telemetry Server MQ Managed File Transfer Service MQ Managed File Transfer Agent On zOS and IBM I the Java runtime is a prerequisite and the supported versions are described below Note that the MQ Queue Manager components includes the mqweb server component For the MQ Java and JMS clients the Java support is the same whether the connection is over TCPIP or via local bindings AdoptOpenJDK with OpenJ9 JVM

11 and future fix packs IBM Runtime Environment Java Technology Edition

8 and future fix packs 801 and future fix packs 8041 and future fix packs 8050 and future fix packs 8060 and future fix packs Oracle Java SDKJREJDK

80 and future fix packs 1101 and future fix packs Remember that when you use ldquojava -versionrdquo you will see something like java 18 (instead of version 8) You have to ldquoremoverdquo the ldquo1rdquo in order to find out the version

Page 11 of 26

9 ++ About AdoptOpenJDK and OpenJDK MQ 915 CD supports AdoptOpenJDK version 11 and later MQ 92 also supports AdoptOpenJDK version 11 and later The terminology is a bit confusing though The system requirements for MQ are very specific about supporting AdoptOpenJDK which is (see item ldquo1drdquo) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by community (open source licensed) MQ does NOT support ldquoOpenJDKrdquo (using the strict definition of the term ldquo1crdquo) Please note that the following specific term is NOT included in our supported requirements OpenJDK has a very specific meaning prebuilt OpenJDK binaries maintained by Oracle Notes - MQ 914 CD and earlier CDs do NOT support AdoptOpenJDK - MQ 910x LTS (such as 9105) do NOT support AdoptOpenJDK - MQ 90x LTSCD do NOT support AdoptOpenJDK + Difference between OpenJDK and AdoptOpenJDK httpsstackoverflowcomquestions52431764difference-between-openjdk-and-adoptopenjdk In short 1) OpenJDK has multiple meanings and can refer to 1a) free and open source implementation of the Java Platform Standard Edition (Java SE) 1b) open source repository mdash the Java source code aka OpenJDK project 1c) prebuilt OpenJDK binaries maintained by Oracle 1d) prebuilt OpenJDK binaries maintained by the OpenJDK community (open source licensed) =gt AdoptOpenJDK 2) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by OpenJDK community (open source licensed) This is the same as 1d above

Page 12 of 26

10 ++ How to download the MQ Classes for Java and MQ Classes for JMS There are several ways for a customer to get the MQ Classes for Java and MQ Classes for JMS There are several factors to take into account - Is there plenty of disk space Or very limited disk available - Are they using an application server such as JBoss or WebLogic - Is the customer developing an MQ client application which will be packaged in such a way that the MQ jar files will be included (This is the MQ Redistributable package which avoids the end user to download the MQ jar files) Please see the following VERY COMPREHENSIVE article which has a table comparing the different methods httpswwwibmcomsupportpagesnode597665 Installation scenarios for MQ 80 and 90 in Linux and Windows Key concepts - Redistributable distribute the runtime with an application both inside and outside of your environment - Relocatable put the files somewhere else other than a fixed default location + MQ Server media Must download from IBM Passport Advantage From IBM Passport Advantage you can download the manufacturing refresh MQ 9202 LTS that includes 9200 + 9201 + 9202 httpswwwibmcomsoftwarepassportadvantagepao_customerhtml search for Part Number CC9S0ML Description IBM MQ 9202 Long Term Support Release for Linux on x86 64-bit eImage Linux Filename IBM_MQ_9202_LINUX_X86-64targz CC9S4ML Description IBM MQ 9202 Long Term Support Release for Windows 64-bit elmage Windows Filename IBM_MQ_9202_WINDOWSzip CC9RWML Description IBM MQ 9202 Long Term Support Release for AIX eImage This option is very easy but requires plenty of disk space It is installed by user ldquorootrdquo Administrator The installation uses the OS facilities and the OS knows that MQ is installed It does not include the ldquoRedistributablerdquo jar files

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 10 of 26

Select the tab Supported Software Select the section Java Java Except on zOS and IBM I the following IBM MQ product components only support the Java runtime packaged with them The Java runtime cannot be changed AMQP Service MQ Queue Manager MQ Telemetry Server MQ Managed File Transfer Service MQ Managed File Transfer Agent On zOS and IBM I the Java runtime is a prerequisite and the supported versions are described below Note that the MQ Queue Manager components includes the mqweb server component For the MQ Java and JMS clients the Java support is the same whether the connection is over TCPIP or via local bindings AdoptOpenJDK with OpenJ9 JVM

11 and future fix packs IBM Runtime Environment Java Technology Edition

8 and future fix packs 801 and future fix packs 8041 and future fix packs 8050 and future fix packs 8060 and future fix packs Oracle Java SDKJREJDK

80 and future fix packs 1101 and future fix packs Remember that when you use ldquojava -versionrdquo you will see something like java 18 (instead of version 8) You have to ldquoremoverdquo the ldquo1rdquo in order to find out the version

Page 11 of 26

9 ++ About AdoptOpenJDK and OpenJDK MQ 915 CD supports AdoptOpenJDK version 11 and later MQ 92 also supports AdoptOpenJDK version 11 and later The terminology is a bit confusing though The system requirements for MQ are very specific about supporting AdoptOpenJDK which is (see item ldquo1drdquo) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by community (open source licensed) MQ does NOT support ldquoOpenJDKrdquo (using the strict definition of the term ldquo1crdquo) Please note that the following specific term is NOT included in our supported requirements OpenJDK has a very specific meaning prebuilt OpenJDK binaries maintained by Oracle Notes - MQ 914 CD and earlier CDs do NOT support AdoptOpenJDK - MQ 910x LTS (such as 9105) do NOT support AdoptOpenJDK - MQ 90x LTSCD do NOT support AdoptOpenJDK + Difference between OpenJDK and AdoptOpenJDK httpsstackoverflowcomquestions52431764difference-between-openjdk-and-adoptopenjdk In short 1) OpenJDK has multiple meanings and can refer to 1a) free and open source implementation of the Java Platform Standard Edition (Java SE) 1b) open source repository mdash the Java source code aka OpenJDK project 1c) prebuilt OpenJDK binaries maintained by Oracle 1d) prebuilt OpenJDK binaries maintained by the OpenJDK community (open source licensed) =gt AdoptOpenJDK 2) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by OpenJDK community (open source licensed) This is the same as 1d above

Page 12 of 26

10 ++ How to download the MQ Classes for Java and MQ Classes for JMS There are several ways for a customer to get the MQ Classes for Java and MQ Classes for JMS There are several factors to take into account - Is there plenty of disk space Or very limited disk available - Are they using an application server such as JBoss or WebLogic - Is the customer developing an MQ client application which will be packaged in such a way that the MQ jar files will be included (This is the MQ Redistributable package which avoids the end user to download the MQ jar files) Please see the following VERY COMPREHENSIVE article which has a table comparing the different methods httpswwwibmcomsupportpagesnode597665 Installation scenarios for MQ 80 and 90 in Linux and Windows Key concepts - Redistributable distribute the runtime with an application both inside and outside of your environment - Relocatable put the files somewhere else other than a fixed default location + MQ Server media Must download from IBM Passport Advantage From IBM Passport Advantage you can download the manufacturing refresh MQ 9202 LTS that includes 9200 + 9201 + 9202 httpswwwibmcomsoftwarepassportadvantagepao_customerhtml search for Part Number CC9S0ML Description IBM MQ 9202 Long Term Support Release for Linux on x86 64-bit eImage Linux Filename IBM_MQ_9202_LINUX_X86-64targz CC9S4ML Description IBM MQ 9202 Long Term Support Release for Windows 64-bit elmage Windows Filename IBM_MQ_9202_WINDOWSzip CC9RWML Description IBM MQ 9202 Long Term Support Release for AIX eImage This option is very easy but requires plenty of disk space It is installed by user ldquorootrdquo Administrator The installation uses the OS facilities and the OS knows that MQ is installed It does not include the ldquoRedistributablerdquo jar files

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 11 of 26

9 ++ About AdoptOpenJDK and OpenJDK MQ 915 CD supports AdoptOpenJDK version 11 and later MQ 92 also supports AdoptOpenJDK version 11 and later The terminology is a bit confusing though The system requirements for MQ are very specific about supporting AdoptOpenJDK which is (see item ldquo1drdquo) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by community (open source licensed) MQ does NOT support ldquoOpenJDKrdquo (using the strict definition of the term ldquo1crdquo) Please note that the following specific term is NOT included in our supported requirements OpenJDK has a very specific meaning prebuilt OpenJDK binaries maintained by Oracle Notes - MQ 914 CD and earlier CDs do NOT support AdoptOpenJDK - MQ 910x LTS (such as 9105) do NOT support AdoptOpenJDK - MQ 90x LTSCD do NOT support AdoptOpenJDK + Difference between OpenJDK and AdoptOpenJDK httpsstackoverflowcomquestions52431764difference-between-openjdk-and-adoptopenjdk In short 1) OpenJDK has multiple meanings and can refer to 1a) free and open source implementation of the Java Platform Standard Edition (Java SE) 1b) open source repository mdash the Java source code aka OpenJDK project 1c) prebuilt OpenJDK binaries maintained by Oracle 1d) prebuilt OpenJDK binaries maintained by the OpenJDK community (open source licensed) =gt AdoptOpenJDK 2) AdoptOpenJDK mdash prebuilt OpenJDK binaries maintained by OpenJDK community (open source licensed) This is the same as 1d above

Page 12 of 26

10 ++ How to download the MQ Classes for Java and MQ Classes for JMS There are several ways for a customer to get the MQ Classes for Java and MQ Classes for JMS There are several factors to take into account - Is there plenty of disk space Or very limited disk available - Are they using an application server such as JBoss or WebLogic - Is the customer developing an MQ client application which will be packaged in such a way that the MQ jar files will be included (This is the MQ Redistributable package which avoids the end user to download the MQ jar files) Please see the following VERY COMPREHENSIVE article which has a table comparing the different methods httpswwwibmcomsupportpagesnode597665 Installation scenarios for MQ 80 and 90 in Linux and Windows Key concepts - Redistributable distribute the runtime with an application both inside and outside of your environment - Relocatable put the files somewhere else other than a fixed default location + MQ Server media Must download from IBM Passport Advantage From IBM Passport Advantage you can download the manufacturing refresh MQ 9202 LTS that includes 9200 + 9201 + 9202 httpswwwibmcomsoftwarepassportadvantagepao_customerhtml search for Part Number CC9S0ML Description IBM MQ 9202 Long Term Support Release for Linux on x86 64-bit eImage Linux Filename IBM_MQ_9202_LINUX_X86-64targz CC9S4ML Description IBM MQ 9202 Long Term Support Release for Windows 64-bit elmage Windows Filename IBM_MQ_9202_WINDOWSzip CC9RWML Description IBM MQ 9202 Long Term Support Release for AIX eImage This option is very easy but requires plenty of disk space It is installed by user ldquorootrdquo Administrator The installation uses the OS facilities and the OS knows that MQ is installed It does not include the ldquoRedistributablerdquo jar files

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 12 of 26

10 ++ How to download the MQ Classes for Java and MQ Classes for JMS There are several ways for a customer to get the MQ Classes for Java and MQ Classes for JMS There are several factors to take into account - Is there plenty of disk space Or very limited disk available - Are they using an application server such as JBoss or WebLogic - Is the customer developing an MQ client application which will be packaged in such a way that the MQ jar files will be included (This is the MQ Redistributable package which avoids the end user to download the MQ jar files) Please see the following VERY COMPREHENSIVE article which has a table comparing the different methods httpswwwibmcomsupportpagesnode597665 Installation scenarios for MQ 80 and 90 in Linux and Windows Key concepts - Redistributable distribute the runtime with an application both inside and outside of your environment - Relocatable put the files somewhere else other than a fixed default location + MQ Server media Must download from IBM Passport Advantage From IBM Passport Advantage you can download the manufacturing refresh MQ 9202 LTS that includes 9200 + 9201 + 9202 httpswwwibmcomsoftwarepassportadvantagepao_customerhtml search for Part Number CC9S0ML Description IBM MQ 9202 Long Term Support Release for Linux on x86 64-bit eImage Linux Filename IBM_MQ_9202_LINUX_X86-64targz CC9S4ML Description IBM MQ 9202 Long Term Support Release for Windows 64-bit elmage Windows Filename IBM_MQ_9202_WINDOWSzip CC9RWML Description IBM MQ 9202 Long Term Support Release for AIX eImage This option is very easy but requires plenty of disk space It is installed by user ldquorootrdquo Administrator The installation uses the OS facilities and the OS knows that MQ is installed It does not include the ldquoRedistributablerdquo jar files

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 13 of 26

Linux UNIX Example rpm files Sample programs The sample application programs are needed if you want to check your IBM MQ installation using the verification procedures Fileset name MQSeriesSamples (such as MQSeriesSamples-920-0x86_64rpm) rpm -qpl MQSeriesSamples-920-0x86_64rpm optmqmsampjms optmqmsampjmssamples optmqmsampjmssamplesJmsBrowserclass optmqmsampjmssamplesJmsBrowserjava optmqmsampjmssamplesJmsConsumerclass optmqmsampjmssamplesJmsConsumerjava optmqmsampjmssamplesJmsProducerclass optmqmsampjmssamplesJmsProducerjava optmqmsampjmssamplesJmsJndiBrowserclass optmqmsampjmssamplesJmsJndiBrowserjava optmqmsampjmssamplesJmsJndiConsumerclass optmqmsampjmssamplesJmsJndiConsumerjava optmqmsampjmssamplesJmsJndiProducerclass optmqmsampjmssamplesJmsJndiProducerjava optmqmsampjmssamplesinteractive optmqmsampjmssamplesinteractiveSampleConsumerJavaclass optmqmsampjmssamplesinteractiveSampleConsumerJavajava optmqmsampwmqjava optmqmsampwmqjavasamples optmqmsampwmqjavasamplesMQSampleclass optmqmsampwmqjavasamplesMQSamplejava Java messaging The files needed for messaging using Java (includes Java Message Service) Fileset name MQSeriesJava (such as MQSeriesJava-920-0x86_64rpm) rpm -qpl MQSeriesJava-920-0x86_64rpm optmqmjavabinJMSAdmin optmqmjavabinJMSAdminconfig optmqmjavabinjmsconfig optmqmjavabinrunamscred optmqmjavabinrunjms optmqmjavadoc optmqmjavadocWMQJMSClasses optmqmjavadocWMQJavaClasses optmqmjavalib optmqmjavalibOSGi optmqmjavalibOSGi optmqmjavalibcomibmmqallclientjar optmqmjavalibcomibmmqheadersjar optmqmjavalibcomibmmqjar

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 14 of 26

optmqmjavalibcomibmmqjmqijar optmqmjavalibcomibmmqpcfjar optmqmjavalibcomibmmqtraceControljar optmqmjavalibcomibmmqjmsjar optmqmjavalibfscontextjar optmqmjavalibjca optmqmjavalibjcawmqjmsraivtear optmqmjavalibjcawmqjmsrarar optmqmjavalibjmsjar optmqmjavalibjmscc optmqmjavalibjmscccomibmmsgclientcommonserviceswmqjar optmqmjavaliblibmqjexitstub02so optmqmjavaliborgjsonjar optmqmjavalibproviderutiljar optmqmjavalib64 optmqmjavalib64libmqjexitstub02so Java JRE A Java Runtime Environment that is used by those parts of IBM MQ that are written in Java Fileset name MQSeriesJRE (such as MQSeriesJRE-920-0x86_64rpm) rpm -qpl MQSeriesJRE-920-0x86_64rpm optmqm optmqmjava optmqmjavajre64 optmqmjavajre64mq_jre64targz optmqmswidtag optmqmswidtagIBM_MQ_JRE-180mqtag Note The fileset MQSeriesSDK is the Software Development Kit for non-Java (C Cobol)

Windows For details on which files are supplied with the MQ Client see httpswwwibmcomsupportpagesnode1172932 MQ 914 CD Server for Windows What are the files and directories that are created by the installation of each component

- The component ldquoServerrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 15 of 26

+ MQ Client media It is downloaded from IBM Fix Central httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Scroll to section Resource adapter clients and other resources See the subsection Clients Click on

IBM MQ C and NET clients =gt httpsibmbizmq92clients You will be taken to a selected list of items from IBM Fix Central Some example items are Item 3 release level 9202-IBM-MQC-Win64 Long Term Support 9202 Client install image for IBM MQ on Windows x64 Item 10 release level 9202-IBM-MQC-LinuxX64 Long Term Support 9202 Client rpm install packages for IBM MQ on Linux x86-64 Note that in the name of the installation file to be downloaded the C in MQC means Client and not C-language That is the MQ Client includes the interfaces for C-language and JavaJMS

httpsibmbizmq92clients Example release level 9203-IBM-MQC-Win64

Long Term Support 9203 Client install image for IBM MQ on Windows x64

File 9203-IBM-MQC-Win64zip (33437 MB)

release level 9203-IBM-MQC-LinuxX64

Long Term Support 9203 Client rpm install packages for IBM MQ on Linux x86-64

File 9203-IBM-MQC-LinuxX64targz (38071 MB) The MQ Client media for Windows consists of 4 components 1 MQI Client (includes GSKit) 2 Extended Messaging APIs 3 Development Toolkit 4 Java Runtime Environment - The component ldquoExtended Message APIsrdquo provides the MQ jar files - The component ldquoJava Runtime Environmentrdquo provides the JRE - The component ldquoDevelopment Toolkitrdquo provides the Java and JMS samples

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 16 of 26

+ Other packages To download start by visiting this important web page (I suggest that you bookmark it in your browser) The following web page has the Main menu with the links for everything related to the download of MQ code httpswwwibmcomdocsenibm-mq92topic=roadmap-mq-downloads IBM MQ 92 IBM MQ downloads Any MQ version all downloads Resource adapter clients and other resources Clients IBM MQ Java JMS client =gt httpsibmbizmq92javaclient IBM MQ redistributable clients =gt httpsibmbizmq92redistclients

IBM MQ Resource Adapter - For use with any Java EE 7 compliant application server =gt httpsibmbizmq92JRA

httpsibmbizmq92javaclient

Example

release level 9203-IBM-MQ-Install-Java-All

Long Term Support 9203 IBM MQ JMS and Java All Client

File 9203-IBM-MQ-Install-Java-Alljar (5138 MB)

httpsibmbizmq92redistclients

Example release level 9203-IBM-MQC-Redist-Java

Long Term Support 9203 IBM MQ JMS and Java redistributable client

File 9203-IBM-MQC-Redist-Javazip (2798 MB)

httpsibmbizmq92JRA

Example release level 9203-IBM-MQ-Java-InstallRA

Long Term Support 9203 IBM MQ Resource Adapter for use with Application Servers

File 9203-IBM-MQ-Java-InstallRAjar (2168 MB)

See tutorial httpswwwibmcomsupportpagesnode6202719 Download install and test IBM-MQ-Install-Java-All (comibmmqallclientjar) and IBM-MQ-Java-InstallRA (wmqjmsrarar)

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 17 of 26

11 ++ How to install the MQ JRE and the MQ Classes + Linux installation The following tutorial can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 91 the same principles apply to all versions release types (LTSCD) and fix packs It applies also to the queue manager andor client components All the tasks are done with the default Installation1 which is optmqm httpswwwibmcomsupportpagesnode725975 Installing MQ 9100 LTS applying Fix Pack MQ 9101 and uninstalling MQ in Linux RHEL

+ Windows installation The following tutorials can be helpful for the installation and uninstallation tasks when you want to have only 1 installation in the host or when you want to do the first installation on a host that will have multiple installations Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available Even though the titles specify MQ 90 the same principles apply to all versions and release types (LTSCD) httpswwwibmcomsupportpagesnode598547 Installing MQ 90 in Windows using only the defaults httpswwwibmcomsupportpagesnode598549 Installing MQ 90 in Windows specifying additional components (Telemetry AMS MFT) httpswwwibmcomsupportpagesnode598589 Uninstalling MQ 90 components in Windows (example Telemetry)

+ Installation of fix pack in Windows You can follow the instructions from the following Chapter Chapter 6 Installing fix pack MQ 80014 (for Installation1) Chapter 7 Installing Fix Pack 9104 (for Installation2 or other) from this very comprehensive and practical tutorial You can review the following tutorial regarding this scenario httpswwwibmcomsupportpagesnode2800929 Installing MQ 9100 LTS to coexist with MQ 8009 in Windows including applying Fix Packs 80014 and 9104 Note that the steps are the same for all fix packs Thus even though the tutorial says MQ 9104 you can use the same steps for MQ 9105

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 18 of 26

+ Installation and Maintenance of MQ in AIX Even though the titles specify MQ 90 91 and 92 the same principles apply to all versions release types (LTSCD) and fix packs The principles apply also to the queue manager andor client components Keep in mind that the Fix Packs mentioned in the tutorial were the ones that were the latest at the time the tutorial was written It does NOT mean that those fix packs are the recommended ones The recommended Fix Packs are always the latest ones available NOTE about upgrading In AIX and in Windows it is NOT necessary to uninstall the current version of MQ before you install the new version However in my opinion there is nothing gained in keeping the current version if you keep it the OS will actually make a backup into another directory in the disk and thus you will not be saving time nor disk space Thus my recommendation is to uninstall MQ 90 which will free up the directory usrmqm and then install MQ 92 on usrmqm httpswwwibmcomsupportpagesnode6407850 Installing in AIX - MQ 9001 LTS applying Fix Pack 90011 Uninstalling MQ httpswwwibmcomsupportpagesnode6407842 Summary of AIX commands to administrate MQ httpswwwibmcomsupportpagesnode6405792 Customization of an AIX server for using MQ

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 19 of 26

12 ++ Running MQ JMS samples using the JRE provided with MQ - Because customers could have SEVERAL different JREs MQ is NOT assuming forcing the use the JRE that is shipped with MQ and thus the utility lsquosetmqenvrsquo does NOT add into the PATH the directory where the JRE (executable file java) is located - This means that is up to the user to specify which JRE (if any) to be used - If the JRE from MQ is desired then in the bashrc or profile it is necessary to add 2 statements 1) Run the setmqenv command that sets the environment variable for MQ including the ones for MQ JavaJMS optmqmbinsetmqenv -n Installation1 2) Add the directory for the JRE into the PATH export PATH=$PATH$MQ_JRE_PATHbin 3) Logoff and login again Ensure that the JRE can be found and that is the desired one (the one from MQ) which java The following is a scenario in which the customer has installed MQ 92 in Linux but has not customized the bashrc as mentioned above Then the customization is done and we can run an MQ JMS sample application + Scenario A No customization in the bashrc at this time su - mqm Last login Wed Sep 8 140007 PDT 2021 on pts0 mqmaztlan1fyreibmcom homemqm $ set | grep MQ (no results) $ set | grep -i java (no results) $ set | grep -i jre (no results) $ cd optmqmsampjmssamples $ ls interactive JmsBrowserjava JmsConsumerjava JmsJndiBrowserjava JmsJndiConsumerjava JmsJndiProducerjava JmsProducerjava JmsBrowserclass JmsConsumerclass JmsJndiBrowserclass JmsJndiConsumerclass JmsJndiProducerclass JmsProducerclass simple $ java JmsProducer -bash java command not found

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 20 of 26

+ Scenario B) After the customization in the bashrc is done logoff and login mqmaztlan1fyreibmcom homemqm $ optmqmbinsetmqenv -n Installation1 $ set | grep -i mqm CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesopt mqmsampjmssamples MQ_DATA_PATH=varmqm MQ_ENV_MODE=64 MQ_INSTALLATION_NAME=Installation1 MQ_INSTALLATION_PATH=optmqm MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre MQ_RETVAL=0 PATH=optmqmbinusrlib64qt-33binusrlocalbinbinusrbinusrlocalsbinusrsbinusrlocalbinhomemqmbinsbinhomemqmlocalbinhomemqmbin $ set | grep -i java CLASSPATH=optmqmjavalibcomibmmqjaroptmqmjavalibcomibmmqjmsjaroptmqmjavalibcomibmmqallclientjaroptmqmsampwmqjavasamplesoptmqmsampjmssamples MQ_JAVA_DATA_PATH=varmqm MQ_JAVA_INSTALL_PATH=optmqmjava MQ_JAVA_LIB_PATH=optmqmjavalib64 MQ_JRE_PATH=optmqmjavajre64jre $ grep -i jre MQ_JRE_PATH=optmqmjavajre64jre $ export PATH=$PATH$MQ_JRE_PATHbin $ which java optmqmjavajre64jrebinjava $ cd optmqmsampjmssamples $ java JmsBrowser No arguments Mandatory arguments must be specified Usage JmsBrowser -m queueManagerName -d queueName [-h host -p port -l channel]

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 21 of 26

+ Using wrapper laquo runmqjms raquo Angel likes to use a short shell script as a wrapper to the ldquojavardquo executable in that way some options can be specified including how to get the MQ trace File name runmqjms Angel likes to put this wrapper in a directory that can be accessed by other users in the Linux server Directory usrlocalbin Users can copy that file into their $HOMEbin for further customization There are 3 different scenarios with this wrapper The default is number 1 to run without getting a trace If you want to get a trace then comment out option 1 and uncomment option 2 If you want to have far more control on the tracing you can create a file such as ldquomyjmsconfigrdquo (based on optmqmjavabinjmsconfig) and comment out options 1 and 2 and uncomment option 4 + begin file (ignore this line) Name runmqjms 1) Not using jmsconfig nor properties java -Djavalibrarypath=$MQ_JAVA_LIB_PATH $ 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ 4) Using jmsconfig file java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientconfiglocation=filevarmqmmyjmsconfig $ + end file (ignore this line)

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 22 of 26

+ Example of running JmsProducer mqmaztlan1fyreibmcom $ cd $HOME $ mkdir bin $ cd bin $ vi runmqjms $ cd $HOME $ mkdir test-jms $ cd test-jms Letrsquos copy both the java source code and the class bytecode $ cp optmqmsampjmssamplesJmsProducerclass Letrsquos take a look at the header of the java source code to find out the usage Usage JmsProducer -m queueManagerName -d destinationName [-h host -p port -l channel] [-u user -w passWord] for example JmsProducer -m QM1 -d Q1 JmsProducer -m QM1 -d topicfoo -h localhost -p 1414 -u tester -w testpw For this example the local queue manager is QM92 using port 1414 and it has a queue named Q1 Run with the default (no tracing) $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 hellip and the actual command to be executed will be this $ java -Djavalibrarypath=$MQ_JAVA_LIB_PATH JmsProducer -m QM92 -d Q1 -h localhost -p 1414 Enter some text to be sent in a message ltENTER to finishgtTESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 23 of 26

JMSDeliveryDelay 0 JMSDeliveryTime 1631193807143 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961013e0040 JMSTimestamp 1631193807143 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210909 JMS_IBM_PutTime 13232718 TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 24 of 26

13 ++ Running with trace + Storing the trace file in the current directory If you want to get the trace modify runmqjms uncomment option 2 2) Using Java arguments for the command line (trace file in local directory name mqjms_PIDtrc) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON $ $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to homemqmtest-jmsmqjava_25160clutrc Enter some text to be sent in a message ltENTER to finishgttesting Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631137618031 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e3961012a0040 JMSTimestamp 1631137618031 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0 JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 21465808 testing Enter some text to be sent in a message ltENTER to finishgt SUCCESS

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 25 of 26

Notice that 2 files are created mqjava_25160cl0trc =gt actual trace mqjmslog0 =gt indicators that the tracing was invoked mqmaztlan1fyreibmcom homemqmtest-jms $ ls -l -r--r--r-- 1 mqm mqm 7359 Sep 8 1441 JmsProducerclass -r--r--r-- 1 mqm mqm 8935 Sep 8 1441 JmsProducerjava -rw-rw-r-- 1 mqm mqm 5594762 Sep 8 1447 mqjava_25160cl0trc -rw-rw-r-- 1 mqm mqm 576 Sep 8 1446 mqjmslog0 + Storing the trace file in the varmqmtrace (which will be picked up by runmqras) If you want to get the trace modify runmqjms uncomment option 3 3) Using Java arguments for the command line (trace file mqjms_PIDtrc in directory varmqmtrace) java -Djavalibrarypath=$MQ_JAVA_LIB_PATH -Dcomibmmsgclientcommonservicestracestatus=ON -DcomibmmsgclientcommonservicestraceoutputName=varmqmtracemqjms_PIDtrc $ mqmaztlan1fyreibmcom homemqmtest-jms $ runmqjms JmsProducer -m QM92 -d Q1 -h localhost -p 1414 The IBM MQ messaging client trace mechanism is tracing to varmqmtracemqjms_27134trc Enter some text to be sent in a message ltENTER to finishgtTESTING TESTING Sent message JMSMessage class jms_text JMSType null JMSDeliveryMode 2 JMSDeliveryDelay 0 JMSDeliveryTime 1631139053681 JMSExpiration 0 JMSPriority 4 JMSMessageID ID414d5120514d39322020202020202020ee2e396101360040 JMSTimestamp 1631139053681 JMSCorrelationID null JMSDestination queueQ1 JMSReplyTo null JMSRedelivered false JMSXAppID JmsProducer JMSXDeliveryCount 0

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end

Page 26 of 26

JMSXUserID mqm JMS_IBM_PutApplType 28 JMS_IBM_PutDate 20210908 JMS_IBM_PutTime 22105373 TESTING TESTING Enter some text to be sent in a message ltENTER to finishgt SUCCESS mqmaztlan1fyreibmcom homemqmtest-jms $ ls JmsProducerclass JmsProducerjava mqjmslog0 mqmaztlan1fyreibmcom homemqmtest-jms $ ls varmqmtrace AMQ85030FMT AMQ85030TRC mqjms_27134trc +++ end