Author |
Message
|
sravan |
Posted: Tue Jun 12, 2012 12:45 pm Post subject: Transaction management. |
|
|
Centurion
Joined: 02 Apr 2010 Posts: 104 Location: Charlotte
|
I have an XML request out of which 1- n mainframe MQ mesages have to
be genarated and send to a queue.
Request is in the form of http REST.
If any failure occurs in message broker we need to stop commiting the messages to the queue.
one of the requirement for this is not to wire the catch terminal of the input node.
This will generate a SOAP Fault,But I dont want to send a SOAP fault to the requester instead I need to send a http response with my existing XSD,Can you please let me know how to handle this. _________________ skr_wmb |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jun 12, 2012 1:00 pm Post subject: Re: Transaction management. |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
sravan wrote: |
one of the requirement for this is not to wire the catch terminal of the input node. |
Or... you could wire the catch terminal and rethrow the error after you process what you need from the exception. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jun 12, 2012 1:05 pm Post subject: Re: Transaction management. |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
sravan wrote: |
If any failure occurs in message broker we need to stop commiting the messages to the queue. |
This doesn't mean anything. You can either commit the current transaction, or not.
You can either design your flow such that the MQOutput node participates in the flow level transaction, or not.
If the MQOutput node participates in the current transaction, then all messages it creates will be part of the same transaction. |
|
Back to top |
|
 |
rekarm01 |
Posted: Wed Jun 13, 2012 12:14 am Post subject: Re: Transaction management. |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
lancelotlinc wrote: |
Or... you could wire the catch terminal and rethrow the error after you process what you need from the exception. |
It's not clear how this would solve the OP's problem. Moreover, once a node catches an Exception and routes it through the catch terminal, it's no longer possible to rethrow the original Exception.
The InfoCenter describes how to change the format of the fault message returned to the client, or how to use the HTTPTimeout terminal to return a custom response. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Jun 13, 2012 4:59 am Post subject: Re: Transaction management. |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
rekarm01 wrote: |
lancelotlinc wrote: |
Or... you could wire the catch terminal and rethrow the error after you process what you need from the exception. |
It's not clear how this would solve the OP's problem. Moreover, once a node catches an Exception and routes it through the catch terminal, it's no longer possible to rethrow the original Exception.
The InfoCenter describes how to change the format of the fault message returned to the client, or how to use the HTTPTimeout terminal to return a custom response. |
I was challenging the OP's 'business requirement' that catch terminals be unwired. Managers who have never implemented a message flow should not be making architectural decisions like "you are not allowed to wire your catch terminal". _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
sravan |
Posted: Wed Jun 13, 2012 6:19 am Post subject: |
|
|
Centurion
Joined: 02 Apr 2010 Posts: 104 Location: Charlotte
|
This is not a requirement from any one.
If there are 8 messages to be generated ,if the 5th message fails I should not commit the messages to the queue as they belong to a group.
also I have to send the error respnse back to the user using the existing XSD.
If I wire the catch terminal first 4 messages will be written to the queue.
To avoid this as lancelotlinc mentioned we can use a throw node to
throw the excetpion as well as send the errror response by wiring the cath terminal. _________________ skr_wmb |
|
Back to top |
|
 |
inMo |
Posted: Thu Jun 14, 2012 5:11 am Post subject: |
|
|
 Master
Joined: 27 Jun 2009 Posts: 216 Location: NY
|
sravan wrote: |
If I wire the catch terminal first 4 messages will be written to the queue. |
Only if you treat the transaction and particular path in a manner that causes that outcome. |
|
Back to top |
|
 |
sravan |
Posted: Thu Jun 14, 2012 5:45 am Post subject: |
|
|
Centurion
Joined: 02 Apr 2010 Posts: 104 Location: Charlotte
|
Thanks, lancelotlinc for you'r suggestion! _________________ skr_wmb |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Jun 14, 2012 5:51 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
visasimbu |
Posted: Thu Jun 14, 2012 7:00 am Post subject: |
|
|
 Disciple
Joined: 06 Nov 2009 Posts: 171
|
Use the 'Transaction mode' property in the MQOutput Node. |
|
Back to top |
|
 |
|