camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xanko <tvautrin.w...@gmail.com>
Subject camel-hazelcast & Transactions
Date Tue, 05 Feb 2013 07:16:52 GMT
Hi,

I want use hazelcast component to share data between routes. See below (in a
webapp with spring) :

      <tx:annotation-driven />
      <tx:jta-transaction-manager />
	
	<camelContext xmlns="http://camel.apache.org/schema/spring">
		<route id="file-to-queue">
			<from uri="file://D:/Dev/mailer/in" />
			<camel:transacted />
			<to uri="hazelcast:seda:foo" />
		</route>
		<route id="queue-to-file" >
			<from uri="hazelcast:seda:foo" />
			<camel:transacted />
			<camel:process ref="myProcessor" />
			<to uri="file://D:/Dev/mailer/out" />
		</route>
	</camelContext>

In my hazelcast configuration (hazelcast.xml), I persist data into a
FileMapStore.

My problem is that when the second route get data from the seda:foo, the
method "delete" of my MapStore is immediatly invoked without pending the
commit of my transaction. Thus my backup file is removed and if the server
crashed during that my message is in "myProcessor", my message is definitly
lost.

I have the impression that my transaction is not started from the endpoint
with hazelcast.

I use JTA, TomEE+ 1.5.1, Camel 2.10.3 and Hazelcast 2.5..

Appreciate your help 




--
View this message in context: http://camel.465427.n5.nabble.com/camel-hazelcast-Transactions-tp5726943.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message