Hi,

I was browsing the transactional package to understand how it works, and got
a little confused and wonder if someone can help me out:

In the TransactionalRegion class, why is the commitPendingTransactions set
added to the current transaction in beginTransaction method?
shouldn't it be in the RequestCommit method?

plus, shouldn't this code be protected using synchronized, even though
commitPendingTransactions is a synchronized set, since this is a iteration?

the code is as follows:

// Order is important here
    for (TransactionState commitPending : commitPendingTransactions) {
      state.addTransactionToCheck(commitPending);
}

Thanks!

Reply via email to