|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
  |
|
Sending Message in MQJMS transacted session, no exception |
View previous topic :: View next topic |
Author |
Message
|
abhay09 |
Posted: Mon Jul 17, 2017 2:21 am Post subject: Sending Message in MQJMS transacted session, no exception |
|
|
Acolyte
Joined: 31 May 2016 Posts: 66
|
Hi Guys,
I have gone through the IBM docs which says
"For messages sent in a transacted session, the application ultimately determines whether the queue manager has received the messages safely when it calls commit()."
Ref: https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.0.1/com.ibm.mq.csqzaw.doc/jm41220_.htm
Scenario:
I have an application that reads message from inbound queue and put in outbound queue and this whole process is under XA txn.
Now, if put is inhibited on outbound queue, then producer.send() is not throwing any exception and exception is raised only when we did txn.commit.
Raised exception is generic XA exception which is not stating the root cause of failure like "put inhibited" or any mq reason code.
Question:
1.) Can producer.send() throw any exception in transacted session (XA) or only txn.commit will throw exceptions for any issue in delivery?
2.) For any failure in message delivery, How can we get the root cause of failure (like JMS error code/MQ error code) as txn.commit is throwing only XA exceptions.?
Please suggest as it is v imp.
Any help will be appreciated.
Many Thanks! |
|
Back to top |
|
 |
zpat |
Posted: Mon Jul 17, 2017 4:17 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Always report the linked exception when using MQ with Java. _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
abhay09 |
Posted: Sun Jul 23, 2017 10:05 pm Post subject: |
|
|
Acolyte
Joined: 31 May 2016 Posts: 66
|
No Linked exception is coming as MQ exception.
Only XA Exception is thrown.
Please let me know any way to throw Exceptions for any issue in transacted session with mqjms api. |
|
Back to top |
|
 |
tomleend |
Posted: Tue Jul 25, 2017 2:40 am Post subject: |
|
|
Acolyte
Joined: 24 Jan 2014 Posts: 51
|
|
Back to top |
|
 |
abhay09 |
Posted: Wed Jul 26, 2017 4:48 am Post subject: |
|
|
Acolyte
Joined: 31 May 2016 Posts: 66
|
yes you are right.
We can set
queue.setPutAsyncAllowed( WMQConstants.WMQ_PUT_ASYNC_ALLOWED_DISABLED);”
Then getting exceptions in between txn also.
Thanks! |
|
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
|
|
|
|