JPA: pattern for handling OptimisticLockException

后端 未结 4 1513
隐瞒了意图╮
隐瞒了意图╮ 2020-12-14 08:33

what is the correct pattern for handling OLE in a (REST) web service? this is what i\'m doing now, for example,

protected void doDelete(HttpServletRequest re         


        
4条回答
  •  甜味超标
    2020-12-14 09:00

    By the way, catch (InterruptedException e) {} is always a bad idea, because the system has asked your computation to cancel, and you are ignoring it. In the context of a web service, an InterruptedException would be another good reason to signal an error to the client.

提交回复
热议问题