{
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.READ), 0) == LockResult.GRANTED)
{
value.value = _values[x][y];
atomicTransaction.commit(true);
}
else
{
atomicTransaction.rollback();
throw new InvocationException(Reason.ReasonConcurrencyControl);
}
}
catch (InvocationException invocationException)
{
interposition.unregisterTransaction();
throw invocationException;
}
catch (Exception exception)
{
System.err.println("AITMatrixImpl01.get_value: " + exception);
if (atomicTransaction.get_status() == Status.StatusActive)
{
atomicTransaction.rollback();
}
interposition.unregisterTransaction();
throw new InvocationException(Reason.ReasonUnknown);
}
catch (Error error)
{
System.err.println("AITMatrixImpl01.get_value: " + error);
if (atomicTransaction.get_status() == Status.StatusActive)
{
atomicTransaction.rollback();
}
interposition.unregisterTransaction();
throw new InvocationException(Reason.ReasonUnknown);