Spring中编程式事务处理(使用TransactionTemplate)
Spring的编程式事务处理,需要使用Hibernate事务回调接口,事务回调接口可以管理Hibernate的事务:TransactionCallbackWithoutResult —— 执行事务没有返回值,例如save、update、delete等等;TransactionCallback —— 执行事务处理后有返回值,如find要返回结果集(List);使用Spring的IoC容器
转载
2009-07-07 14:47:00 ·
2129 阅读 ·
0 评论