scalar-labs / btm

JTA Transaction Manager
Apache License 2.0
426 stars 151 forks source link

LrcXAResource autocommit can't be restore #13

Open vivikcat opened 10 years ago

vivikcat commented 10 years ago

It happend to two transcations T1 & T2. T2's Propagation.REQUIRES_NEW, T1 is suspended. T2 submit and resume T1. T1 enlist to XAResourceManager, then xaResourceHolderState.start > LrcXAResource.start LrcXAResource code line 152: autocommitActiveBeforeStart = connection.getAutoCommit(); if (autocommitActiveBeforeStart) { connection.setAutoCommit(false); }

for now. autocommit have been set false before T1 been suspended, variable autocommitActiveBeforeStart is changed, it is not right flag. because when T1 submit , connection autocommit can't be restore before

I used btm2.1.4

lorban commented 10 years ago

Github is the host of BTM 3.0.x, the old 2.1.x will stay at codehaus. Could you please check that the same problem applies to 3.0.0, and in good open-source tradition, eventually provide a patch?