<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:flex="http://www.springframework.org/schema/flex"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd">
<!-- spring 事务管理 start-->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="*" propagation="REQUIRES_NEW" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="allservice"
expression="execution(public * com.coerKingdoms.services.*.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="allservice" />
</aop:config>
<!-- spring 事务管理 end-->
分享到:
相关推荐
spring+hibernate spring配置事务
12.6.16 编写Spring和Hibernate的配置文件spring-config.xml 12.6.17 编写web.xml 12.6.18 验证示例 12.7 小结 第四篇 J2EE项目案例精选 第十三章 网上调查系统 13.1 系统概述 13.2 需求分析 13.2.1 系统用例图 ...
前几天搞 Spring + Hibernate + Struts 事务配置 ,网上找了好多资料,不过好无语,大多都是 Ctrl + V,浪费俺的宝贵时间 现在我总结配出一套,给大家参考参考,可能有不足,请大家多多交流。 附:内有弹出...
struts+hibernate+spring事务配置
•配置Hibernate和事务 •装载Spring的applicationContext.xml文件 •建立业务层和DAO之间的依赖关系 •将Spring应用到Struts中 简介 这个例子是建立一个简单的web应用,叫MyUsers,完成用户管理操作,...
Spring4.0+Hibernate4.0+Struts2.3整合案例:实现增删改查。 ===================== application.xml: xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=...
struts+hibernate+spring事务配置_花粉册.rar 超详细配置,有图片实例
struts2+spring+hibernate分页,事务,自定义切面,事务的配置
一个小实例工程,说的是spring3+hibernate4配置声明式事务管理(annotation方式)
spring mvc hibernate整合,采用MyEclipse自动生成包和配置文件,jar包可能有多余,但是不影响整体效果。服务器tomcat。数据库mysql。
Spring将事务管理分成了两类: * 编程式事务管理 * 手动编写代码进行事务管理.(很少使用) * 声明式事务管理: * 基于TransactionProxyFactoryBean的方式.(很少使用) * 需要为每个进行事务管理的类,配置一个...
使用到了Hibernate中的: HQL查询 SQL查询 QBC查询 配置文件中配置SQL/HQL语句查询 使用到了Spring中的: Ioc实现动态代理 和 Aop实现自动事务处理!
2.Spring+Jotm整合实现JTA分布式事务,应用场景如转账等,同一事务内完成db1用户加100元、db2用户减100元。 3.Spring+Junit4单元测试,优点:不会破坏数据库现场,等等。 (特别注意:Spring3.0里不在提供对jotm的...
一个实例小工程,说的是spring3+hibernate4怎么配置声明式事务管理(xml方式)
jqueryeasyui+struts+spring+hibernate的整合,前台到后台完整的代码,事务配置,完整的jar包,可直接使用。
其中包含apache的log4j记录日志信息,spring管理组件,springmvc分层,springaop配置数据库事务控制,hibernate二级缓存配置,实现了查询,用户登录注册,请求验证是否登录等基础功能Demo,基于后台测试,使用前台...
Spring+Hibernate 使用TransactionInterceptor声明式事务配置
spring+hibernate+atomikos实现多数据源分布式事务管理
其中包含apache的log4j记录日志信息,spring管理组件,springmvc分层,springaop配置数据库事务控制,hibernate二级缓存配置,实现了查询,用户登录注册,请求验证是否登录等基础功能Demo,基于后台测试,使用前台...
12.6.16 编写Spring和Hibernate的配置文件spring-config.xml 12.6.17 编写web.xml 12.6.18 验证示例 12.7 小结 第四篇 J2EE项目案例精选 第十三章 网上调查系统 13.1 系统概述 13.2 需求分析 13.2.1 系统用例图 ...