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 » IBM MQ Java / JMS » MQJMS API, which are main error code to destroy connection

Post new topic  Reply to topic
 MQJMS API, which are main error code to destroy connection « View previous topic :: View next topic » 
Author Message
abhay09
PostPosted: Tue May 31, 2016 9:09 am    Post subject: MQJMS API, which are main error code to destroy connection Reply with quote

Acolyte

Joined: 31 May 2016
Posts: 66

Hi,

I am using MQJMS API to connect to MQv8.0.

In my application, I am pooling JMSContext using Apache lib.

From API, I can see MQJMS classes mainly throw JMSException and JMSRunTimeException.

Now, it has many error codes,
https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.javadoc.doc/WMQJMSClasses/errorcodes.html


So, need suggestion on which error code shall i destroy JmsContext form my pool and return context for other codes.

Please suggest and help me in solving this.

Thanks!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 31, 2016 12:14 pm    Post subject: Re: MQJMS API, which are main error code to destroy connecti Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

abhay09 wrote:
Hi,

I am using MQJMS API to connect to MQv8.0.

In my application, I am pooling JMSContext using Apache lib.

From API, I can see MQJMS classes mainly throw JMSException and JMSRunTimeException.

Now, it has many error codes,
https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.javadoc.doc/WMQJMSClasses/errorcodes.html


So, need suggestion on which error code shall i destroy JmsContext form my pool and return context for other codes.

Please suggest and help me in solving this.

Thanks!


JMS errors have usually little significance. You need to extract the provider's error code and information.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
abhay09
PostPosted: Wed Jun 01, 2016 9:15 pm    Post subject: Re: MQJMS API, which are main error code to destroy connecti Reply with quote

Acolyte

Joined: 31 May 2016
Posts: 66

fjb_saper wrote:
abhay09 wrote:
Hi,

I am using MQJMS API to connect to MQv8.0.

In my application, I am pooling JMSContext using Apache lib.

From API, I can see MQJMS classes mainly throw JMSException and JMSRunTimeException.

Now, it has many error codes,
https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.javadoc.doc/WMQJMSClasses/errorcodes.html


So, need suggestion on which error code shall i destroy JmsContext form my pool and return context for other codes.

Please suggest and help me in solving this.

Thanks!


JMS errors have usually little significance. You need to extract the provider's error code and information.



Hi,

Ok, As per IBM docs also https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q032290_.htm

They have linked exceptions, where in I can find MQ Exception

So, shall i iterate Jms Exception to get MQ specific exception and do any operation on certain MQ exception?
I think we can ignore JMS Exception and do operation on for linked MQ Exceptions.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jun 02, 2016 4:37 am    Post subject: Re: MQJMS API, which are main error code to destroy connecti Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

abhay09 wrote:
So, shall i iterate Jms Exception to get MQ specific exception and do any operation on certain MQ exception?


Yes, as you would for any MQ - aware application.

abhay09 wrote:
I think we can ignore JMS Exception and do operation on for linked MQ Exceptions.


Yes, except in so far as the JMS Exception is what you need to catch to obtain the linked exception. You can certainly ignore the content of the JMS Exception.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jun 02, 2016 4:42 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

You cannot entirely ignore a JMSException. There may or may not be a linked exception present. Some JMS Exceptions have nothing to do with the provider: example you ran out of connections in the pool; i.e. your pool size is too small, or you're not returning connections properly to the pool...

So while your application should always check for the linked Exception it may not ignore a JMSException without a linked exception...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
abhay09
PostPosted: Thu Jun 02, 2016 9:02 am    Post subject: Reply with quote

Acolyte

Joined: 31 May 2016
Posts: 66

fjb_saper wrote:
You cannot entirely ignore a JMSException. There may or may not be a linked exception present. Some JMS Exceptions have nothing to do with the provider: example you ran out of connections in the pool; i.e. your pool size is too small, or you're not returning connections properly to the pool...

So while your application should always check for the linked Exception it may not ignore a JMSException without a linked exception...


Ok, thanks!

Will look into it.
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 » IBM MQ Java / JMS » MQJMS API, which are main error code to destroy connection
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.