{
com.arjuna.ats.jts.ExplicitInterposition interposition = new com.arjuna.ats.jts.ExplicitInterposition();
interposition.registerTransaction(ctrl);
AtomicTransaction atomicTransaction = new AtomicTransaction();
try
{
atomicTransaction.begin();
if (setlock(new Lock(LockMode.WRITE), 0) == LockResult.GRANTED)
{
atomicTransaction.rollback();
}
else
{
atomicTransaction.rollback();
throw new InvocationException();
}
}
catch (InvocationException invocationException)
{
interposition.unregisterTransaction();
throw invocationException;
}
catch (Exception exception)
{
System.err.println("AITExplicitObjectImpl01.tran_rollback_writelock: " + exception);
if (atomicTransaction.get_status() == Status.StatusActive)
{
atomicTransaction.rollback();
}
interposition.unregisterTransaction();
throw new InvocationException();
}
catch (Error error)
{
System.err.println("AITExplicitObjectImpl01.tran_rollback_writelock: " + error);
if (atomicTransaction.get_status() == Status.StatusActive)
{
atomicTransaction.rollback();
}
interposition.unregisterTransaction();
throw new InvocationException();