Fixed bug in using STM together with Active Objects

This commit is contained in:
Jonas Bonér 2010-07-18 07:13:43 +02:00
parent 4dabf49b52
commit 2cdfdb2e26
15 changed files with 152 additions and 111 deletions

View file

@ -156,8 +156,13 @@ class GlobalStm extends TransactionManagement with Logging {
val result = body
val txSet = getTransactionSetInScope
log.ifTrace("Committing global transaction [" + mtx + "]\n\tand joining transaction set [" + txSet + "]")
try {
txSet.tryJoinCommit(
mtx,
TransactionConfig.DefaultTimeout.length,
TransactionConfig.DefaultTimeout.unit)
// Need to catch IllegalStateException until we have fix in Multiverse, since it throws it by mistake
try { txSet.tryJoinCommit(mtx, TransactionConfig.TIMEOUT, TimeUnit.MILLISECONDS) } catch { case e: IllegalStateException => {} }
} catch { case e: IllegalStateException => {} }
result
}
})