自动化配置OracleLinux FTP yum源
2014-04-05 20:45
363 查看
<!-- 配置hibernate事务管理器 -->
<bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<!-- 定义事务通知指明需要制定的事务管理器 -->
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="get*" read-only="true"/>
<tx:method name="insert*" propagation="REQUIRED"/>
<tx:method name="update*" propagation="REQUIRED"/>
<tx:method name="delete*" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<aop:config>
<!-- 声明那些方法应用这些规则 -->
<aop:pointcut expression="execution(* com.dragon.dao.*.*(..))" id="daoMethod"/>
<!-- 将事务通知与应用方法组合 -->
<aop:advisor advice-ref="txAdvice" pointcut-ref="daoMethod"/>
</aop:config>
希望对您有所帮助 这是完整的声明式事务的代码 spring整合hibenrate的<wbr></wbr>
<bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<!-- 定义事务通知指明需要制定的事务管理器 -->
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="get*" read-only="true"/>
<tx:method name="insert*" propagation="REQUIRED"/>
<tx:method name="update*" propagation="REQUIRED"/>
<tx:method name="delete*" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<aop:config>
<!-- 声明那些方法应用这些规则 -->
<aop:pointcut expression="execution(* com.dragon.dao.*.*(..))" id="daoMethod"/>
<!-- 将事务通知与应用方法组合 -->
<aop:advisor advice-ref="txAdvice" pointcut-ref="daoMethod"/>
</aop:config>
希望对您有所帮助 这是完整的声明式事务的代码 spring整合hibenrate的<wbr></wbr>
相关文章推荐
- mac上如何卸载oracle jdk 1.7
- 对表进行delete&shrink&move无法提高rman的备份效率
- oracle超出了表空间users的空间限量问题
- 在windows 2008R2上安装oracle 12C
- Tuning 14 Using Oracle Data Storage Structures Efficiently
- Tuning 13 Using oracle blocks Efficiently
- oracle命令学习笔记(一)
- oracle Linux下实现浏览历史命令----rlwrap
- Statement 与PreparedStatement的区别
- Oracle installation
- Linux下安装oracle 12C需要的rpm包
- Linux下安装oracle 11g需要的rpm包
- oracle(第一天)
- 如何为ORACLE表空间或临时表空间增加数据文件?
- oracle 11g各种下载地址
- oracle 11g各种下载地址
- oracle学习 数据完整性
- oracle常用函数汇总
- Oracle学习(一)表空间和区(2)
- Oracle学习1 表空间和区(1)