|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Linked Exceptions: Getting the MQ RC for a JMS Exception |
« View previous topic :: View next topic » |
Author |
Message
|
SAFraser |
Posted: Mon Mar 03, 2008 10:00 am Post subject: Linked Exceptions: Getting the MQ RC for a JMS Exception |
|
|
 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 |
|
 |
hornbeam123 |
Posted: Fri Jan 09, 2009 9:03 am Post subject: Linked Exceptions: Getting the MQ RC for a JMS Exception |
|
|
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 |
|
 |
SAFraser |
Posted: Fri Jan 09, 2009 9:20 am Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|