例外: JTA事务意外回滚(可能是由于超时);嵌套的异常是weblogic.transaction.RollbackException:在交易中调用setRollbackOnly
我的代码:
@Override
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
公共无效updateBEmployee(长interfaceId,字符串jsonObj,字符串cmIds,字符串url)
{
transactionTemplate.execute(new TransactionCallbackWithoutResult(){
受保护的void doInTransactionWithoutResult(TransactionStatus status){
尝试{
bDAO.updateBackgroundInterfaceXMLResponse(interfaceId,jsonObj);
bDAO.updateCustomerEmployeeLinkSent(url,cmIds);
} catch(Exception e){
status.setRollbackOnly();
}
}
});
}