Ticket #5 (closed 需求: 已处理)
修正数据库autocommit的问题
| Reported by: | xujianyou | Owned by: | xujianyou |
|---|---|---|---|
| Priority: | 一般 | Version: | 2.0 |
| Keywords: | Cc: | ||
| Due Date: | 13/12/2011 |
Description
目前系统有部份功能执行某些功能后,数据库并没有修改,原因是没有程序没有提交事务。
Change History
Note: See
TracTickets for help on using
tickets.
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)
1,某些操作代码,通过spring初始化获得了datasource,但却没有在spring容器运行,将这些对象实例加入到spring容器中即可。
2,某些操作代码,跑在spring容器里,但没有提交相应的事务,配置文件中配置org.springframework.jdbc.datasource.DataSourceTransactionManager?,加入相应的事务传播即可。