IBM Support

How to read and write fields from the MQMD with WebSphere MQ Classes for JMS Version 7: direct, using JNDI and using WebSphere Application Server

White Papers


Abstract

The objective of this techdoc is to show how to read and write the MQMD fields in a message, using the WebSphere MQ JMS Version 7 code. A portion of the needed information is located in different links of the MQ and WebSphere Application Server (WAS) Information Centers. This article tries to put in a single place all the different pieces of the puzzle.

Content

This document shows all the steps and excerpts of source code for the following scenarios:

1) Direct specification of Connection Factory and Destination (Not using JNDI)
2) Using JNDI (via file system context)
3) Using an MDB inside WebSphere Application Server (WAS) V7

A zip file is included that has all the source code mentioned in the document: MQ-JMS-MQMD.zip

DISCLAIMER
All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

File: MQ-JMS-MQMD.zip
MQ-JMS-MQMD.zipMQ-JMS-MQMD.zip

File: How to read and write MQMD fields.pdf
How to read and write MQMD fields.pdfHow to read and write MQMD fields.pdf

[{"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.0;8.0;7.5;7.1;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java Message Service (JMS)","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg27020570