camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Daubman <>
Subject Confirmed fix for CAMEL-5161 - MyBatis holding sessions open and locking DB on insert exception
Date Wed, 11 Apr 2012 18:04:18 GMT
I have confirmed that a fix to CAMEL-5161, where MyBatis locking the DB due
to not closing a session that experienced an exception trying to insert a
duplicate unique index, is indeed to add another try/finally block inside
each of the finally blocks already used in the insert/update methods in:

Every Insert/Update related function in the file ends like:
finally {

Changing to:
    try {
    } finally {
prevents the issue I was experiencing from happening.

I have not submitted a patch since it's a very minor change and I am
currently not working in an area where I have access to the SVN (or
internet) from my dev box.

Is there a more elegant way to handle this than cascading try/finally
Is there a (good) reason why all of the methods in
have blanket 'throws Exception' clauses (if they did not, the source of
this issue may have been more apparent).

Thanks again,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message