List of usage examples for javax.persistence OptimisticLockException OptimisticLockException
public OptimisticLockException(Object entity)
OptimisticLockException
exception with the specified entity. From source file:com.vladmihalcea.service.impl.ItemServiceImpl.java
@Override @Retry(times = 2, on = OptimisticLockException.class) @Transactional//w ww .ja v a2s. co m public void saveItem() { incrementCalls(); LOGGER.info("Save Item!"); throw new OptimisticLockException("Save Item!"); }
From source file:com.vladmihalcea.service.impl.ItemServiceImpl.java
@Override @Retry(times = 2, on = OptimisticLockException.class, failInTransaction = false) @Transactional/* w w w . java 2 s . c o m*/ public void saveItems() { incrementCalls(); LOGGER.info("Save Items!"); throw new OptimisticLockException("Save Items!"); }