try
{
if (getStatus() == javax.transaction.Status.STATUS_ACTIVE)
{
TwoPhaseCoordinator theTx = null;
try
{
/*
* If this is an imported transaction and we have just
* performed interposition, then register a purely local
* Synchronization. This gets us over a performance issue
* with JacORB.
*/
theTx = (TwoPhaseCoordinator) BasicAction.Current();
if (theTx != null)
theTx.addSynchronization(new LocalCleanupSynchronization(
this));
else
registerSynchronization(new CleanupSynchronization(this));
}
catch (ClassCastException ex)