mysql LOCK TABLES 이후 트랜잭션 롤백이 불가능한 문제 해결
717 단어 데이터베이스
try{
....
lock tables ...
}finally{
unlock tables...;
}
구덩이가 왔습니다. 이렇게 하면fun1이 굴러가지 않습니다. 해결은 Controller층에서 자물쇠를 방출하는 것입니다. 즉, 자물쇠 방출은fun1에서 방출할 수 없습니다.
예컨대
public ModelAndView handleRequest(HttpServletRequest req, HttpServletResponse resp) throws Exception {ModelAndView mav = new ModelAndView();Result result = new Result();try {result = upListService.updataListGoodsEx(code,goodsNumStr,goodsIdStr,teamIdStr,goodsPriceStr,user.getStructId());} catch (Exception e) {result.setMsg(e.getMessage());}finally {sfm.unlockTable(null);}return CheckUtil.returnResult(mav, result.getCode(), result.getMsg(), result.getData());}
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
SQLite의 query로 망설임이것은 내가 처음 안드로이드 응용 프로그램 개발에서 망설이고, 그 후 해결 된 방법을 비망록으로 철자하고 있습니다. java에서 SQLite를 이용한 애플리케이션을 작성하는 동안 EditText에 입력된 item이 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.