Fix BasicHibernateAnnotationsTest

This commit is contained in:
Andrea Boriero 2016-04-22 22:05:08 +01:00 committed by Steve Ebersole
parent d67db86f73
commit 7b107539db
1 changed files with 2 additions and 2 deletions

View File

@ -6,6 +6,7 @@
*/
package org.hibernate.test.annotations.entity;
import javax.persistence.OptimisticLockException;
import java.math.BigDecimal;
import java.util.Currency;
import java.util.Date;
@ -16,7 +17,6 @@ import java.util.Set;
import org.hibernate.AnnotationException;
import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
@ -116,7 +116,7 @@ public class BasicHibernateAnnotationsTest extends BaseCoreFunctionalTestCase {
parallelTx.commit();
fail( "All optimistic locking should have make it fail" );
}
catch (HibernateException e) {
catch (OptimisticLockException e) {
if ( parallelTx != null ) parallelTx.rollback();
}
finally {