Are you having MQ Cluster problems or issues?

The following are links to solutions in the IBM WebSphere MQ documentation for particular problems / issues.

Regards,
Roger Lacroix
Capitalware Inc.

IBM MQ Comments Off on Are you having MQ Cluster problems or issues?

IBM’s Watson computer to be on Jeopardy!

In February 2011, IBM’s Watson computer will be on the TV game show Jeopardy!. Watson will take on 2 of the greatest Jeopardy champions ever: Ken Jennings and Brad Rutter.

IBM press release:
http://www.ibm.com/press/us/en/pressrelease/33233.wss

From a nerd point of view, this is really interesting. I definitely will be watching those 3 Jeopardy! episodes (Feb. 14, 15 and 16). Boy, it would be really fascinating / stimulating / stressful to be part of the team that develops Watson. 🙂

Regards,
Roger Lacroix
Capitalware Inc.

General Comments Off on IBM’s Watson computer to be on Jeopardy!

Information on MQ Message Behavior

The following is general information on WebSphere MQ (aka MQSeries) message behavior during normal and abnormal message processing. The first thing to understand about MQ is that, it is not a database but a real-time messaging system. It was built on the following 2 principles:

  1. Once-only delivery of a message
  2. Assured delivery of a message (not guaranteed for legal reasons)

MQ supports 2 types of messaging models: point-to-point and Publish/Subscribe (Pub/Sub).

MQ messaging behavior when MQ is used as a point-to-point messaging system:

  1. Unconsumed non-persistent messages will remain on a queue regardless of what has happened to the application (i.e. crashes, normal disconnects, etc). If a queue manager is restarted then ALL non-persistent messages in a queue with attribute NPMCLASS equal to Normal are deleted. If the queue’s attribute NPMCLASS is equal to High then the messages are not deleted.
  2. Unconsumed persistent messages will remain on a queue regardless of what has happened to the application (i.e. crashes, normal disconnects, etc). If a queue manager is restarted then persistent messages survive a queue manager restart.

MQ messaging behavior when MQ is used as a Pub/Sub messaging system:

  1. For non-durable subscriptions, if a consumer disconnects or crashes or loses connectivity to the queue manager for any reason, then ALL published messages will NOT be saved / stored for that particular consumer (Other consumers are not affected). When the consumer reconnects, they will begin receiving messages ONLY from the point in time that they successfully reconnected. All previous pub/sub messages (during the disconnection period) will be discarded.
  2. For durable subscriptions, if a consumer disconnects or crashes or loses connectivity to the queue manager for any reason, then all published messages will be saved / stored for that particular consumer. When the consumer reconnects they will receive all outstanding messages for that particular topic. Of course, the biggest problem with durable subscriptions is ‘what if the consumer never reconnects?’ This means that messages would accumulate forever and fill-up the queue. MQ applications should only use durable subscriptions when the application will be reconnecting to the queue manager in a timely fashion.

Unit of Work (i.e. SYNCPOINT)

If any message is put on a queue under a Unit Of Work (UOW) then there are other MQ behaviors that must be considered.

  1. If an application issues an MQDISC or ends normally, with current uncommitted operations, an implied MQCMIT is executed by WebSphere MQ (i.e. all operations done under SYNCPOINT are committed).
  2. If an application crashes / abnormally ends then an implied MQBACK is executed by WebSphere MQ (i.e. all operations done under SYNCPOINT are backed-out).

Once the user understands how MQ behaves then they will understand what is happening to the application’s messages during normal and abnormal processing.

Regards,
Roger Lacroix
Capitalware Inc.

IBM MQ, Programming Comments Off on Information on MQ Message Behavior

JMSException and MQ Reason Codes

J2EE (JMS) programmers who are new to IBM MQ (formally WebSphere MQ, MQSeries) sometimes are confused as to why they are getting a particular JMS exception. The problem with the JMS / MQ layer is that the useful MQ information is hidden in the JMSException. By useful MQ information, I mean the MQ Completion Code (CC) and Reason Code (RC). In particular, it is the MQ Reason Code that provides the key to why the code is having the issue.

Generally, J2EE programmers will catch the JMS exception via the JMSException clause and dump out the exception message. A typical JMSException clause:

catch (JMSException e)
{
   System.err.println(e.getLocalizedMessage());
}

The J2EE programmer may see one of the following JMS exception messages in their program’s output / log file:

javax.jms.JMSException: MQJMS1000: Failed to create JMS message
javax.jms.JMSException: MQJMS1016: an internal error has occurred.
javax.jms.JMSException: MQJMS1017: non-local MQ queue not valid for receiving or browsing
javax.jms.JMSException: MQJMS1079: Unable to write message to dead letter queue
javax.jms.JMSException: MQJMS1107: connection problem
javax.jms.JMSException: MQJMS1068: failed to obtain XAResource
javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager
javax.jms.JMSException: MQJMS2007: failed to send message to MQ queue
javax.jms.JMSException: MQJMS2008: failed to open MQ queue
javax.jms.JMSException: MQJMS2009: MQQueueManager.commit() failed
javax.jms.JMSException: MQJMS2014: Queue manager rejected XA client connection
javax.jms.JMSException: MQJMS3011: Failed to publish message to MQ queue
javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication supplied for MQQueueManager

The problem is that there is no MQ related information in those JMS exception messages. So, the $100,000 question is: ‘How can the J2EE programmer retrieve MQ related information’?

Simple: You need to dump out the LinkedException for the JMS exception:

catch (JMSException e)
{
   System.err.println("getLinkedException()=" + e.getLinkedException());
   System.err.println(e.getLocalizedMessage());
}

The getLinkedException method will give you the MQ reason code which will help you determine what is the real issue. Using the above snippet of code, the output may look like:

getLinkedException()=com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2035.
javax.jms.JMSException: MQJMS2007: failed to send message to MQ queue.

Now the user can look up what the reason code means. If you have WMQ Server or WMQ Client installed then you can execute the mqrc command and pass it the reason code. Open a Command prompt or Unix shell and type the following:

mqrc 2035

And the command will output:

      2035  0x000007f3  MQRC_NOT_AUTHORIZED

For more information, you can look up the MQ Reason Code in the IBM MQ Knowledge Center.

I strongly recommend that all JMSException clauses related to MQ use the getLinkedException method and dump out the MQ information (as noted in Amendent # 2 in my blog posting of Ten Commandments of IBM MQ)

Regards,
Roger Lacroix
Capitalware Inc.

IBM MQ, Java, JMS, Programming 2 Comments

Capitalware Products for WMQ v5.3 on 32-bit Unix

As of December 31st, 2010, Capitalware will no longer support its products on the 32-bit release of WebSphere MQ v5.3 (or earlier) on Unix (AIX, HP-UX and Solaris). Note: This does not affect the support of WebSphere MQ 32-bit for Linux.

IBM ended support for WebSphere MQ v5.3 for distributed platforms on September 22, 2006.
http://www.ibm.com/common/ssi/cgi-bin/ssialias?subtype=ca&infotype=an&appname=iSource&supplier=897&letternum=ENUS906-119

Since WebSphere MQ v6, MQ Server on Unix (AIX, HP-UX and Solaris) is only supported for 64-bit mode, Capitalware’s products will also only support 64-bit mode for WebSphere MQ on Unix.

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, IBM MQ, MQ Authenticate User Security Exit, MQ Standard Security Exit, Unix Comments Off on Capitalware Products for WMQ v5.3 on 32-bit Unix

WebSphere MQ v6 End of Service

Well, we are now down to 9 and 1/2 months before WebSphere MQ v6 goes out of service. The end of service date for WebSphere MQ v6 on distributed platforms (Linux, Unix, Windows, IBM i, etc…) is September 30th, 2011. The official official announcement can be found here:
http://www.ibm.com/support/docview.wss?uid=swg21418724

So MQAdmins, it is time to push your managers, directors, etc.. into scheduling some time for you to do the upgrade. 🙂

Now to through a twist into the picture, I am 99% sure that IBM will announce WebSphere MQ v8 in April 2011. If you are still running MQ v6, do you upgrade to v7 or wait for v8? Something to think about.

By the way, if you have been pining for a new feature in MQ then you should immediately fill out a WebSphere MQ Requirements request form and send it in ASAP. The web site is at:
http://www-01.ibm.com/support/docview.wss?&uid=swg21266802

    I have already sent in 2 requests to IBM:

  • Add support for API Exit on z/OS for Batch, CICS and IMS environments
  • Add support for CHAD exit support of SVRCONN channel on z/OS

I would like to kindly ask any and all people who use WMQ on z/OS to submit a feature request for the next release of WMQ to support API Exits on z/OS and CHAD exit support of SVRCONN channels on z/OS.

Regards,
Roger Lacroix
Capitalware Inc.

IBM i (OS/400), IBM MQ, Linux, Unix, Windows Comments Off on WebSphere MQ v6 End of Service

New: MQ Auditor v1.1.0

Capitalware Inc. would like to announce the official release of MQ Auditor v1.1.0. This is a FREE upgrade for ALL licensed users of MQ Auditor. MQ Auditor is a solution that allows a company to audit/track all MQ API calls performed by MQ applications that are connected to a queue manager.

For more information about MQ Auditor go to:
https://www.capitalware.com/mqa_overview.html

    Changes for MQ Auditor v1.1.0:

  • Added support for UseExcludeUserIDs & ExcludeUserIDs keywords
  • Added support for the following embedded message types: MQCIH, MQDH, MQDLH, MQIIH, MQRFH, MQRFH2, MQRMH, MQTM, MQWIH, MQXQH, MQHSAP, SMQBAD
  • Added code to support the “NONE” value for the Show*** keywords
  • Added program cwdspver to display the product version number
  • Fixed a bug related to UserID used for MQCONN/MQCONNX may be different for MQOPEN
  • Fixed the bug related to the flag that determines if a queue is being monitored
  • Fixed a bug related to Perl and Linux
  • Fixed a bug related to the handling of the AccountingToken field of the MQMD
  • Fixed a bug related to memcpy for RFH2 structure overwriting memory
  • Fixed a bug related to an unset pointer
  • Fixed a number of bugs related to correctly formatting the structures for output to Audit files

Regards,
Roger Lacroix
Capitalware Inc.

Capitalware, IBM i (OS/400), IBM MQ, Linux, MQ Auditor, Unix, Windows Comments Off on New: MQ Auditor v1.1.0

Merry Christmas and Happy New Year

My wife and I have 5 kids, so at this time of year things are very hectic. The kids are saying “let it snow and bring on Christmas”. 🙂

I would like to wish everyone a Merry Christmas, Happy Hanukkah, Happy Kwanzaa, etc… and a Happy New Year. 🙂

Regards,
Roger Lacroix

General Comments Off on Merry Christmas and Happy New Year

Information on MQ Best Practices

There is not a lot of published information on WebSphere MQ best practices. The following is a list of books / manuals and web sites that I have found on MQ best practices:

DeveloperWorks Article: The top 15 WebSphere MQ best practices
http://www.ibm.com/developerworks/websphere/library/techarticles/0807_hsieh/0807_hsieh.html?ca=drs-

DeveloperWorks Article: WebSphere MQ for iSeries Best Practices guide
http://www.ibm.com/developerworks/websphere/library/techarticles/0605_rumsey/0605_rumsey.html

Web Site: Middleware News MQ Best Practices
http://middlewarenews.blogspot.com/2009/05/mq-best-practices.html

Web Site: WMQ Best practices
http://www.gse-nordic.org/Working%20Groups/GNRC/Conferences/2007/Mainframe%20Infrastructure/ae1

SupportPac MD01: MQSeries – Standards and conventions
https://www.capitalware.com/dl/docs/MQStandards.pdf

SupportPac MD00: MQSeries – Creating design standards for applications
http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg24006437&loc=en_US&cs=utf-8&lang=en

Web Site: Sebastia’s “MQ and I” Best Practices
http://usuaris.tinet.cat/sag/mq.htm#mq_best_practices

DeveloperWorks Article: Mission: Messaging: Embracing cultural change in the WebSphere MQ community
http://www.ibm.com/developerworks/websphere/techjournal/0809_mismes/0809_mismes.html

IBM Redbook: WebSphere MQ V6 fundamentals
http://www.redbooks.ibm.com/redbooks/pdfs/sg247128.pdf

IBM MQ Comments Off on Information on MQ Best Practices

Tyler releases version 2 of his Air Hockey app

My son, Tyler (who turned 16 in October), has released version 2 of his Air Hockey game. New features in version 2 are:

  • Online Multiplayer support via the Game Center (free)
  • Added 2 more Achievements

The Air Hockey app is free. If you are into hockey and want a free “i” device app then please give it a try.
http://itunes.apple.com/us/app/air-hockey-gold/id392506292?mt=8

iPhone, iPad & iPod Touch, Mobile Comments Off on Tyler releases version 2 of his Air Hockey app