You need to make sure the code you do in MyProcessor is using JDBC
resources that are managed by the transaction manager so it can
rollback/commit the transaction?



On Tue, Jan 14, 2014 at 6:59 PM, geppo <geppore...@gmail.com> wrote:
> Hi,
> I've written a transacted route
>
>                 from("file:data.inbox?noop=true,readLock:none")
>                         .transacted()
>                         .id(getClass().getSimpleName() + "- Route1")
>                         .idempotentConsumer(simple("${file:name}"), 
> idempotentRepository)
>                         .log("Before")
>                         .process(new MyProcessor())
>                         .log("Route1 completed");
>
> When I run it everything seems to work fine, a file is picked up and some
> processing is done, showing a log similar to:
>     Before
>     Some processing including writing to some DB tables...
>     Route1 completed
>
> The problem is the transaction is not committed. I'm saying that because if
> I kill the process then all the changes performed by MyProcessor on the DB
> are rolled back.
>
> If I don't kill the process, the tables used by MyProcessor appear to be
> locked (I can't even do a Select from the SQLServer Management Studio).
> Also the table used as idempotentRepository is not accessible during this
> time.
>
> I hope I'm making sense...
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Transacted-route-not-committing-tp5745963.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Reply via email to