upgraded to multiverse 0.4-SNAPSHOT

This commit is contained in:
Jonas Bonér 2010-02-22 13:22:10 +01:00
parent 93f2fe0c35
commit 87f66d0c4f
8 changed files with 136 additions and 462 deletions

View file

@ -26,7 +26,7 @@ object TransactionManagement extends TransactionManagement {
def isTransactionalityEnabled = TRANSACTION_ENABLED.get
def disableTransactions = TRANSACTION_ENABLED.set(false)
private[akka] val currentTransaction: ThreadLocal[Option[Transaction]] = new ThreadLocal[Option[Transaction]]() {
private[akka] val currentTransaction = new ThreadLocal[Option[Transaction]]() {
override protected def initialValue: Option[Transaction] = None
}
}
@ -52,6 +52,8 @@ trait TransactionManagement extends Logging {
private[akka] def isTransactionInScope = currentTransaction.get.isDefined
private[akka] def isTransactionTopLevel = if (isTransactionInScope) getTransactionInScope.isTopLevel
private[akka] def incrementTransaction = if (isTransactionInScope) getTransactionInScope.increment
private[akka] def decrementTransaction = if (isTransactionInScope) getTransactionInScope.decrement