HHH-6588 rollback to use "org.hibernate.SQL" category to log sql
This commit is contained in:
parent
75e0ba4ce3
commit
822ae2a135
|
@ -49,6 +49,7 @@ import javax.persistence.criteria.CriteriaQuery;
|
|||
import javax.persistence.criteria.Selection;
|
||||
import javax.persistence.metamodel.Metamodel;
|
||||
import javax.persistence.spi.PersistenceUnitTransactionType;
|
||||
import javax.transaction.Status;
|
||||
import javax.transaction.SystemException;
|
||||
import javax.transaction.TransactionManager;
|
||||
import java.io.IOException;
|
||||
|
@ -1134,7 +1135,9 @@ public abstract class AbstractEntityManagerImpl implements HibernateEntityManage
|
|||
);
|
||||
}
|
||||
try {
|
||||
transactionManager.setRollbackOnly();
|
||||
if ( transactionManager.getStatus() != Status.STATUS_NO_TRANSACTION ) {
|
||||
transactionManager.setRollbackOnly();
|
||||
}
|
||||
}
|
||||
catch ( SystemException e ) {
|
||||
throw new PersistenceException( "Unable to set the JTA transaction as RollbackOnly", e );
|
||||
|
|
Loading…
Reference in New Issue