Hi.
I'm having trouble configuring a route with transacted(). The configuration
of the transaction policy is the one shown below:
<bean id="txManager"
class="org.springframework.transaction.jta.JtaTransactionManager" />
<bean id="propReqTransactionPolicy"
class="org.apache.camel.spring.spi.SpringTransactionPolicy">
<property name="transactionManager" ref="txManager" />
<property name="propagationBehaviorName"
value="PROPAGATION_REQUIRED" />
</bean>
My route:
from(endpoint).
transacted(PROPAGATION_REQ_TRANSACION_POLICY_ID)
.split().method(myMethod).stopOnException().streaming().executorService(MyThreadPoolExecutor)
.process(MyProcessor)
...
.aggregate(..)
to(END);
The thing is that MyProcessor contains a reference to an EJB (using
<jee:jndi-lookup .../> in the camel context config), and thanks to it I can
call to a service (instead of using SOA for transaction issues) which have
to make insertions in a Data Base.
My problem comes when an exception is thrown, because if something have been
inserted previously into the Data Base, it will remain (the rollback isn´t
deleting the inserted registers).
If anyone could tell me if I have any configuration errors or if I am doing
a bad usage of "transacted(policy)", any help would be appreciated.
Thanks in advance.
--
View this message in context:
http://camel.465427.n5.nabble.com/JTA-Transaction-problems-rollback-doesn-t-affect-DB-tp5509159p5509159.html
Sent from the Camel - Users mailing list archive at Nabble.com.