Index: lams_common/src/java/org/lamsfoundation/lams/web/filter/TransactionRetryInterceptor.java =================================================================== diff -u -r82cc782937edbef30643db2908ccac010247ea56 -r39b7c998798c4af0c0fb797bf496779c815efe0e --- lams_common/src/java/org/lamsfoundation/lams/web/filter/TransactionRetryInterceptor.java (.../TransactionRetryInterceptor.java) (revision 82cc782937edbef30643db2908ccac010247ea56) +++ lams_common/src/java/org/lamsfoundation/lams/web/filter/TransactionRetryInterceptor.java (.../TransactionRetryInterceptor.java) (revision 39b7c998798c4af0c0fb797bf496779c815efe0e) @@ -27,15 +27,12 @@ import org.aopalliance.intercept.MethodInvocation; import org.apache.commons.lang.mutable.MutableInt; import org.apache.log4j.Logger; -import org.hibernate.FlushMode; -import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.exception.ConstraintViolationException; import org.hibernate.exception.LockAcquisitionException; import org.lamsfoundation.lams.util.ITransactionRetryService; import org.springframework.dao.CannotAcquireLockException; import org.springframework.dao.DataIntegrityViolationException; -import org.springframework.orm.hibernate3.SessionFactoryUtils; import org.springframework.transaction.UnexpectedRollbackException; /** @@ -91,11 +88,6 @@ attempt.increment(); if (attempt.intValue() <= TransactionRetryInterceptor.MAX_ATTEMPTS) { message.append(". Retrying."); - - // the exception could have closed the session; try to recreate it here - Session session = SessionFactoryUtils.getSession(sessionFactory, true); - // same as in CustomizedOpenSessionInViewFilter - session.setFlushMode(FlushMode.AUTO); } else { message.append(". Giving up."); } @@ -107,6 +99,6 @@ } public void setSessionFactory(SessionFactory sessionFactory) { - this.sessionFactory = sessionFactory; + this.sessionFactory = sessionFactory; } } \ No newline at end of file