Hi,
we tried to switch to 1.1 today but now we get the following exception:
We use declarative transaction support usingCode:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO respectively remove 'readOnly' marker from transaction definition org.springframework.orm.hibernate.HibernateTemplate.checkWriteOperationAllowed(HibernateTemplate.java:901) org.springframework.orm.hibernate.HibernateTemplate$13.doInHibernate(HibernateTemplate.java:319) org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:176) org.springframework.orm.hibernate.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:317) wilken.openshop.modules.base.dao.support.hibernate.BaseDaoSupport.saveOrUpdate(BaseDaoSupport.java:227) wilken.openshop.modules.base.logic.support.BaseLogicSupport.saveOrUpdate(BaseLogicSupport.java:248) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.springframework.aop.framework.AopProxyUtils.invokeJoinpointUsingReflection(AopProxyUtils.java:61) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:149) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:116) org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) $Proxy0.saveOrUpdate(Unknown Source)
@@org.springframework.transaction.interceptor.Defa ultTransactionAttribute() on service objects (readOnly=false).
We also use the OpenSessionInViewInterceptor. Before 1.1 everything worked fine. Now because the FlushMode of the OpenSessionInViewInterceptor is set to NEVER I get this exception.
Should we set the flush mode to AUTO? Will this have any negative impact on the transaction management, in other words will the flushing of the session then still be controlled by the existing Transaction?
Could anybody please clarify this point.
Thanks in advance.
juergen


Reply With Quote