theTx = (TwoPhaseCoordinator) BasicAction.Current();
if (theTx != null) // TM is local
theTx.addSynchronization(new LocalCleanupSynchronization(this));
else
registerSynchronization(new CleanupSynchronization(this));
}
catch (ClassCastException ex)
{
/*
* Not a local/interposed transaction.
*/
registerSynchronization(new CleanupSynchronization(this));
}
}
catch (Exception ex)
{
/*