You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Owen Toalson <ow...@courts.mo.gov> on 2011/08/24 18:31:47 UTC

Camel-Ibatis consumer.onConsume with Oracle throws transaction isolation level error

I have a camel-ibatis app that polls an oracle database table for inserted
rows and uses the onConsume option to update the table with a "row consumed"
column to avoid duplicate polling.  Everything works except the update
statement for the onConsume  throws "READ_COMMITTED and SERIALIZABLE are the
only valid transaction levels"     How do I get around this?  I noticed that
the Class DefaultIBatisProcessingStategy has a hard coded transaction level
of Connection.TRANSACTION_REPEATABLE_READ.  It looks like this Class was
Unit tested with MySQL.  Is there some way that I can configure it
differently from the Oracle database side or is it possible to request that
the Transaction Isolation Level be a configurable element in the
camel-ibatis configuration as an enhancement?  Any ideas or suggestions are
welcome.  Thanks.

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Ibatis-consumer-onConsume-with-Oracle-throws-transaction-isolation-level-error-tp4731035p4731035.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-Ibatis consumer.onConsume with Oracle throws transaction isolation level error

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

On Wed, Aug 24, 2011 at 6:31 PM, Owen Toalson
<ow...@courts.mo.gov> wrote:
> I have a camel-ibatis app that polls an oracle database table for inserted
> rows and uses the onConsume option to update the table with a "row consumed"
> column to avoid duplicate polling.  Everything works except the update
> statement for the onConsume  throws "READ_COMMITTED and SERIALIZABLE are the
> only valid transaction levels"     How do I get around this?  I noticed that
> the Class DefaultIBatisProcessingStategy has a hard coded transaction level
> of Connection.TRANSACTION_REPEATABLE_READ.  It looks like this Class was
> Unit tested with MySQL.  Is there some way that I can configure it
> differently from the Oracle database side or is it possible to request that
> the Transaction Isolation Level be a configurable element in the
> camel-ibatis configuration as an enhancement?  Any ideas or suggestions are
> welcome.  Thanks.
>

I have created a ticket to make this easier to configure out of the box
https://issues.apache.org/jira/browse/CAMEL-4387

What you can do is to implement a custom IBatisProcessingStrategy and
use that. You can just copy the code from the default implementation
and adjust the code to use a TX isolation level that works with your
database.

Then you can configure the ibatis endpoint to use your custom using
the setStrategy method on the ibatis endpoint.

> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Ibatis-consumer-onConsume-with-Oracle-throws-transaction-isolation-level-error-tp4731035p4731035.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Camel-Ibatis consumer.onConsume with Oracle throws transaction isolation level error

Posted by Owen Toalson <ow...@courts.mo.gov>.
Thanks!

--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Ibatis-consumer-onConsume-with-Oracle-throws-transaction-isolation-level-error-tp4731035p4758966.html
Sent from the Camel - Users mailing list archive at Nabble.com.