小弟刚学ssh没多久,做一个ssh的小运用当热手,但是使用spring管理事务之后,批量操作删除的时候,却报错:ERROR - Servlet.service() for servlet default threw exception
org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO or remove 'readOnly' er from transaction definition在网上搜了下,发现应该改spring的getsession()和closesession()方法才行,但是spring的源码却找不到在哪个位置.
我应该怎么做呢,请大家指教?不胜感激!!!
org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.NEVER) - turn your Session into FlushMode.AUTO or remove 'readOnly' er from transaction definition在网上搜了下,发现应该改spring的getsession()和closesession()方法才行,但是spring的源码却找不到在哪个位置.
我应该怎么做呢,请大家指教?不胜感激!!!
解决方案 »
- 系统进行压力测试的时候出现死锁是什么原因
- 一个关于spring 的问题 。。
- 请教个HQL语句,实在搞不清楚怎么做了
- struts1.2,不懂
- 关于Spring配置c3p0的配置问题
- ★ why the filter doesn't work on <many-to-one>
- Struts 入门 (转载自Matrix-与Java共舞)
- 大家帮我看一下,这段代码是否能够链上数据库呢?
- (高分)在jsp环境下,对于en.xml?type=47,xml是怎样取参数type的?另外、、、、?(急等)
- innodb和myisam的区别
- hibernate级联删除的问题
- struts是如何实现自动转载的?
楼主我晕。 如果这种小问题都要去改Spring的源码, Spring早就没人用了。
'readOnly' 的属性。