-
May 24th, 2012, 08:46 AM
#1
Roolback problem not well defined
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public Script updatePerson(Person p) {
Person entity = entityManager.merge(p);
//entityManager.flush();
TransactionAspectSupport.currentTransactionStatus( ).setRollbackOnly();
return entity;
}
When the application execute this code ... i would expect to see a rollback message but the entitymanager stored the entity without to signal a problem.
-
May 24th, 2012, 11:43 AM
#2
Please use [ code][/code ] tags when posting code that way it remains readable. If there is no rollback you either have a no transactions or have a database (MySQL) with tables that don't support transactions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules