Hello Fabrizio

Do you really need to? <transacted> is for having single transaction for
releated DML statements.
If you really need to have commit after each INSERT you can remove
<transacted> and configure your datasource to return connections with
autocommit set to true. But I can't imagine where it's needed.

regards
Grzegorz Grzybek

2015-02-19 15:20 GMT+01:00 fabrizio.spataro <fabrizio.spat...@bizmate.it>:

> Hello,
>
> i am using camel 2.14.2-SNAPSHOT.
>
> Into my transacted route are using this settings:
>
> <bean id="transactionManager"
>
> class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
>           <property name="dataSource" ref="mysql"></property>
> </bean>
>
> <bean id="PROPAGATION_REQUIRES_NEW"
> class="org.apache.camel.spring.spi.SpringTransactionPolicy">
>                 <property name="transactionManager"
> ref="transactionManager"/>
>                 <property name="propagationBehaviorName"
> value="PROPAGATION_REQUIRES_NEW"/>
> </bean>
>
> My routes are:
> <route>
>     <from uri="direct://myRouteOne" />
>
>     <camel:transacted ref="PROPAGATION_REQUIRES_NEW"/>
>
>     <to uri="sql:MY INSERT QUERY 1" />
>
>     <to uri="sql:MY INSERT QUERY 2" />
>
>     <to uri="sql:MY INSERT QUERY 3" />
> </route>
>
> Can i insert a *programmatic commit* between QUERY 2 and QUERY 3? How do it
> with SPRING DSL?
>
> thankx
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/SQL-Component-Transaction-manager-force-commit-tp5762948.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to