ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Links » Linked Exceptions: Getting the MQ RC for a JMS Exception

Post new topic  Reply to topic
 Linked Exceptions: Getting the MQ RC for a JMS Exception « View previous topic :: View next topic » 
Author Message
SAFraser
PostPosted: Mon Mar 03, 2008 10:00 am    Post subject: Linked Exceptions: Getting the MQ RC for a JMS Exception Reply with quote

Shaman

Joined: 22 Oct 2003
Posts: 742
Location: Austin, Texas, USA

Here is an example of code to catch and link a JMS exception to an MQ reason code:

Code:

try {
  .
  . code which may throw a JMSException
  .
} catch (JMSException je) {
  System.err.println("caught "+je);
  Exception e = je.getLinkedException();
  if (e != null) {
    System.err.println("linked exception: "+e);
  }
}


The mqji.jar file needs to be in a location included in CLASSPATH to succesfully generate the reason code.

JMS exceptions without an MQ linked exception are essentially useless.
Back to top
View user's profile Send private message
hornbeam123
PostPosted: Fri Jan 09, 2009 9:03 am    Post subject: Linked Exceptions: Getting the MQ RC for a JMS Exception Reply with quote

Centurion

Joined: 01 Nov 2003
Posts: 101

The post from March 2008 I assume was for MQ6. Didn't recognise mqji.jar.

Has anybody out there got the equivalent linked-exception code for MQ53?

There are so many hits on the forum but so far I have not found a code snippet.
Back to top
View user's profile Send private message
SAFraser
PostPosted: Fri Jan 09, 2009 9:20 am    Post subject: Reply with quote

Shaman

Joined: 22 Oct 2003
Posts: 742
Location: Austin, Texas, USA

We implemented this back in the 5.3 days at our site, and it's still working with the server at 6.0. The clients themselves are still using the very old files from MA88, however.

I'm not proud to have to admit this.... And I am thankful every day that it still works.

I've also made inquiry to IBM about the proper snippets for current versions, but have gotten nothing back. Probably worth raising a PMR at some point; it just hasn't been an issue for us yet.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Links » Linked Exceptions: Getting the MQ RC for a JMS Exception
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.