Commit 4a9d88d8 by WeiCong

增加bd提前退出交易机制

parent 60001fbe
......@@ -5,7 +5,7 @@ public class ExitTransactionException extends RuntimeException {
private String errorCode;
public ExitTransactionException(String message, String errorCode) {
public ExitTransactionException(String errorCode,String message) {
super(message);
this.errorCode = errorCode;
}
......
......@@ -188,14 +188,15 @@ public abstract class AbstractCommonController {
ret = ResultUtil.result(NoUiPresentationUtil.retCode(context), NoUiPresentationUtil.retMsg(context), afterReturnData,paginationData,
NoUiPresentationUtil.handleErrorReturnData(context, alias), NoUiPresentationUtil.handleCodeTableReturnData(context, alias), noUiVersion.getVersion());
}
catch (ExitTransactionException exitTrans)
{
ret = ResultUtil.result(exitTrans.getErrorCode(), exitTrans.getMessage(), "service error", noUiVersion.getVersion());
}
catch (Throwable e) {
log.error("OnClick command error", e);
ret = ResultUtil.result(ErrorCodes.ERROR, "hander error", "service error", noUiVersion.getVersion());
TxInfo.recordException(e);
if(e.getCause() instanceof ExitTransactionException){
ExitTransactionException exitTrans=ExitTransactionException.class.cast(e.getCause());
ret = ResultUtil.result(exitTrans.getErrorCode(), exitTrans.getMessage(), exitTrans.getMessage(), noUiVersion.getVersion());
}else{
log.error("OnClick command error", e);
ret = ResultUtil.result(ErrorCodes.ERROR, "hander error", "service error", noUiVersion.getVersion());
TxInfo.recordException(e);
}
} finally {
if (context != null) {
//context.getSupport().disconnect();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment