On Mon, Jan 18, 2010 at 10:54 AM, Rajika Kumarasiri <raj...@wso2.com> wrote:
> hi, > I was trying to get the following scenario working using distributed JMS > transaction support (jta) in JMS listener so far without any success. I am > trying this using synpase and the JMS transport I think this is the best > place to ask the question. > > Scenario is to read a JMS message from a queue and send it to a back end > service using http transport. In case of a failure in back end service ( > server down, network unreachable etc..) , need to re-send the same message. > In other word the message should only remove from the queue only in case of > a successful delivery. I tried using the JTA JMS support in JMS > listener(according to how JMS transaction is written in JMS listener it > commit the transaction if it able to read the message successfully from the > queue), I think you don't have to use the distributed transactions here since there are no two transactional sources. Your problem is that JMS commits the transaction before it calls AxisEngine.receive(). So I think this should be fixed at the transport level so that it should commit only if sucess and rollback then operation if AxisEngine.receive() throws and AxisFault. thanks, Amila. > then I tried using tx-mediator to mark the start/end/rollback of the > distributed transaction and that didn't work either. Does anybody has any > idea on how to get this scenario working? > > Rajika > -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/