protected void work() throws Exception
{
try
{
TxWrapper tx1 = getTxWrapper();
TxWrapper tx2 = getTxWrapper();
tx1.begin(); // Top level
tx2.begin(); // Nested level
//enlist two participants for TRX
tx1.add(DummyResource.create());
tx2.add(DummyResource.create());
if (isParameterDefined("-commit"))
{
tx2.commit(); // Nested level commit
tx1.commit(); // Top level commit
}
else
{
tx2.abort(); // Nested level rollback
tx1.abort(); // Top level rollback
}
}
catch (Exception e)
{