try
{
createNewProxies(0, policyClass, true);
UserTransaction ut = new MockUserTransaction(clientUserTransactionProxy, infrastructure);
ut.begin();
performTransactionalStickyCalls(3, null, policyClass, newProxiesInBetweenTransactions);
ut.commit();
/* either set would do because they should be the same */
Set<Object> chosenTargetsTx1 = chosenTargets;;
if (newProxiesInBetweenTransactions)
{
createNewProxies(0, policyClass, false);
}
ut.begin();
performTransactionalStickyCalls(3, null, policyClass, newProxiesInBetweenTransactions);
ut.commit();
/* either set would do because they should be the same */
Set<Object> chosenTargetsTx2 = chosenTargets;
assertChosenTargetsInBetweenTx(policyClass, chosenTargetsTx1, chosenTargetsTx2, newProxiesInBetweenTransactions);
}