camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller (Work started) (JIRA) <j...@apache.org>
Subject [jira] [Work started] (CAMEL-5161) If MyBatis experiences an error on commit (e.g. unique PK violation) it appears to hold the session open and cause DB writelock errors
Date Wed, 11 Apr 2012 22:03:16 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-5161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Work on CAMEL-5161 started by Christian Müller.

> If MyBatis experiences an error on commit (e.g. unique PK violation) it appears to hold
the session open and cause DB writelock errors
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-5161
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5161
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-mybatis
>    Affects Versions: 2.10.0
>            Reporter: Aaron Daubman
>            Assignee: Christian Müller
>              Labels: exception, mybatis, sql
>             Fix For: 2.8.5, 2.9.2, 2.10.0
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> When MyBatis experiences an error committing a statement the session.close() is not called
and the DB is caught in a writelock state until camel is exited.
> I have not tested a fix yet, but I believe that if, in: camel/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisProducer.java
> session.commit() is placed in a try/catch block with session.close() in its finally it
will ensure the session is closed even when MyBatis throws an exception during a commit.
> One of the exceptions I've experienced this with is 'java.sql.BatchUpdateException' where
a row was attempting to be inserted with a field that violated a table's unique index constraint.
> I should be able to submit a patch later this week if necessary.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message