ExceptionMapper<HibernateOptimisticLockingFailureException> {
public Response toResponse(HibernateOptimisticLockingFailureException e) {
return Response
.status(Response.Status.INTERNAL_SERVER_ERROR)
.entity(new ConcurrentModificationErrorDTO(
e.getMessage(), Util.getStackTrace(e)))
.type("application/xml").build();
}