[jboss-dev-forums] [Design of JBoss ESB] - Transaction rollback in action pipeline
beve
do-not-reply at jboss.com
Wed Feb 27 03:39:30 EST 2008
When using a global transaction with an action pipeline it is possible for a participant in the transaction to rollback the transaction. For example, an action invoking a database, could call rollback on the connection and have the global transaction rolled back.
But we are also seeing the need to be able to trigger a rollback from other actions in the pipeline.
One use case we have is where we are calling external webservices.
These webservices sometimes respond with faults, like the service is temporarliy unvailable or something like that.
We need to be able to resend these request to the webservices and thought we would use transactions for this.
When we receive a fault we would like to rollback the transaction, which will put the JMS message back on the queue for pickup. (assuming JMS transport here)
This in combination with specifying JCA/JMS redelivery properties like MaxDeliveryAttempts and RedeliveryDelay we can achive what we want.
For more information about how this redelivery could work see this jira : http://jira.jboss.com/jira/browse/JBESB-1563.
The problem is that to rollback the transaction we must throw a RuntimeException.
Is there a way to rollback the transaction in an action pipeline without throwing a RuntimeException?
Should we create an execption specifically for this need that can be used by actions, like a RollbackException?
Any thoughs on this?
Thanks,
Daniel
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132398#4132398
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132398
More information about the jboss-dev-forums
mailing list