标签:back exp exception mil for 简单 erro dead size
try {
return dao.updateBanana(d);
}catch(DeadlockLoserDataAccessException e) {
logger.error("An unexpected error occurred for userId {} , exception : {}.",userId,e.getMessage());
try {
//增加出错重试,在产生死锁的异常中,重试可能有很大几率成功
return dao.updateBanana(d);
}catch (DeadlockLoserDataAccessException ex) {
logger.error("An unexpected error occurred for userId {} again, exception : {}.",userId,e.getMessage());
return 0;
}
}
标签:back exp exception mil for 简单 erro dead size
原文地址:http://www.cnblogs.com/wangdaijun/p/6006504.html