When a Synchronization's beforeCompletion method registers another Synchrinization to the transaction, Bad Things happen.
12:38:20,062 ERROR [STDERR] java.util.ConcurrentModificationException
12:38:20,092 ERROR [STDERR] at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1031)
12:38:20,092 ERROR [STDERR] at java.util.TreeMap$KeyIterator.next(TreeMap.java:1058)
12:38:20,092 ERROR [STDERR] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoP
haseCoordinator.java:211)
12:38:20,092 ERROR [STDERR] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinat
or.java:88)
12:38:20,092 ERROR [STDERR] at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
12:38:20,092 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitA
ndDisassociate(TransactionImple.java:1204)
12:38:20,112 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(B
aseTransaction.java:134)
12:38:20,112 ERROR [STDERR] at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransacti
onManagerDelegate.java:87)
12:38:20,112 ERROR [STDERR] at org.jboss.test.cmp2.ageout.test.JDBC2PmAgeOutUnitTestCase.commitTx(JDBC2PmA
geOutUnitTestCase.java:236)