Write operations are not allowed in read-only mode (FlushMode.MANUAL):错误

ssh错误:
Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.

解决方式:

web.xml增加<param-name>singleSession</param-name>参数值

<filter>
		<filter-name>hibernateFilter</filter-name>
		<filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
		<init-param>
			<param-name>singleSession</param-name>
			<param-value>false</param-value>
		</init-param>
	</filter>

你可能感兴趣的:(read-only)