We use camel for hiding our infrastructure, which means that we call one or more interface methods from java to put messages on a queue. In our current configuration we do two method calls in one java-method. Each call puts a message on a queue. I am trying to put the two method calls in one transaction which will be rolled back if an exception occurs. I've added a @Transactional annotation to my method but if an exception occurs between the first and the second method call the jms-message of the first call is still put on the queue.
This is my route definition: <camel:camelContext> <camel:template id="camelTemplate" /> <camel:proxy id="beschikkingService" serviceInterface="nl.bedrijf.beschikking.BeschikkingService" serviceUrl="direct:directAsyncQueue" /> <camel:endpoint id="asyncQueue" uri="activemq:queue:${queue.name.beschikking}" /> <camel:route id="asyncRoute"> <camel:from uri="direct:directAsyncQueue" /> <camel:to uri="ref:asyncQueue" /> </camel:route> </camel:camelContext> Does anybody have any idea how I need to set this up correctly? -- View this message in context: http://camel.465427.n5.nabble.com/transactional-client-when-hiding-infrastructure-tp5716653.html Sent from the Camel - Users mailing list archive at Nabble.com.