HHH-4662 do not rollback when the exception occurs

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18195 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Emmanuel Bernard 2009-12-10 14:11:33 +00:00
parent ba3639a25a
commit 3703d4c71c
1 changed files with 4 additions and 0 deletions

View File

@ -44,6 +44,7 @@ import javax.persistence.TransactionRequiredException;
import javax.persistence.TypedQuery;
import javax.persistence.PessimisticLockScope;
import javax.persistence.LockTimeoutException;
import javax.persistence.QueryTimeoutException;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.metamodel.Metamodel;
@ -809,6 +810,9 @@ public abstract class AbstractEntityManagerImpl implements HibernateEntityManage
if ( e instanceof LockTimeoutException ) {
return;
}
if ( e instanceof QueryTimeoutException ) {
return;
}
try {
markAsRollback();