in omega/omega-transaction/src/main/java/org/apache/servicecomb/pack/omega/transaction/wrapper/RecoveryPolicyTimeoutWrapper.java [51:86]
public Object applyTo(ProceedingJoinPoint joinPoint, Compensable compensable,
CompensableInterceptor interceptor, OmegaContext context, String parentTxId, int retries)
throws Throwable {
final TimeoutProb timeoutProb = TimeoutProbManager.getInstance().addTimeoutProb(compensable.forwardTimeout());
Object output;
try {
output = this.recoveryPolicy
.applyTo(joinPoint, compensable, interceptor, context, parentTxId, retries);
if (timeoutProb.getInterruptFailureException() != null) {
throw new OmegaException(timeoutProb.getInterruptFailureException());
}
} catch (InterruptedException e) {
if (timeoutProb.getInterruptFailureException() != null) {
throw new OmegaException(timeoutProb.getInterruptFailureException());
}else{
throw new TransactionTimeoutException(e.getMessage(),e);
}
} catch (IllegalMonitorStateException e) {
if (timeoutProb.getInterruptFailureException() != null) {
throw new OmegaException(timeoutProb.getInterruptFailureException());
}else{
throw new TransactionTimeoutException(e.getMessage(),e);
}
} catch (ClosedByInterruptException e) {
if (timeoutProb.getInterruptFailureException() != null) {
throw new OmegaException(timeoutProb.getInterruptFailureException());
}else{
throw new TransactionTimeoutException(e.getMessage(),e);
}
} catch (Throwable e) {
throw e;
} finally {
TimeoutProbManager.getInstance().removeTimeoutProb(timeoutProb);
}
return output;
}