Hi,
When an exception occurs, I must update an entity in database. Can I update this entity in try catch ?
try{
...
}catch(Exception ex){
myService.modifyEntity(entity);
}
Should I have create a new service annotated @Transactional(propagation = Propagation.REQUIRES_NEW) ?
On rollback, using REQUIRES_NEW
will force the start of a new transaction, and I can update this entity. Do you confirm ?
Thanks by advance.