if (i + 1 >= MAX_RETRIES || oldTransaction != null) throw ex;
// Keep ADE check for backward compatibility
ApplicationDeadlockException deadlock = isADE(ex);
if (deadlock != null)
{
if (!deadlock.retryable()) throw deadlock;
log.debug(deadlock.getMessage() + " retrying tx " + (i + 1));
}
else if (retryHandlers != null)
{
boolean retryable = false;