On Wed, Jun 6, 2012 at 10:16 PM, dunnlow <[email protected]> wrote:
> Hi, I have a transacted route in Spring DSL that calls a service (via HTTP
> post).  I want to examine the response from that service and force a
> rollback depending on the returned value.  Basically something like:
>
> <route>
>   <from uri="jpa:com.MyBean"/>
>   <transacted/>
>   <setHeader
> headerName="CamelHttpMethod"><constant>POST</constant></setHeader>
>   <setHeader headerName="charset"><constant>utf-8</constant></setHeader>
>   <setHeader
> headerName="CONTENT_TYPE"><constant>test/xml</constant></setHeader>
>   <to uri="http4://196.12.34.54:2020"/>
>   <choice>
>       <when>
>          <simple>${header.CamelHttpResponseCode} != 202</simple>
>          *(( Roll Back the Transaction ))*
>          </simple>
>       </when>
>   </choice>
> </route>
>
> What is the right way to force a rollback?
>

There is a <rollback>
Or you can throw an exception.


> Thanks for any insight,
> -J
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-to-force-rollback-in-spring-DSL-route-tp5714090.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to