Spring xml事务配置
来源:互联网 发布:野生动物灭绝数据 编辑:程序博客网 时间:2024/05/12 01:39
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<!-- SessionFactory -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<!--<property name="configLocation" value="classpath:hibernate.cfg.xml"></property>-->
<property name="mappingLocations">
<list>
<value>classpath:/com/tpcorp/**/*.hbm.xml</value>
<value>classpath:/com/tpcorp/system/login/def/Staff.hbm.xml</value>
<value>classpath:/com/tpcorp/system/login/def/GroupInfo.hbm.xml</value>
<value>classpath:/com/tpcorp/system/login/def/GroupStaff.hbm.xml</value>
<value>classpath:/com/tpcorp/system/login/def/UserConfig.hbm.xml</value>
<value>classpath:/com/tpcorp/system/login/def/PasswordHistory.hbm.xml</value>
<value>classpath:/com/tpcorp/system/login/def/InvalidLoginHistory.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
<prop key="show_sql">true</prop>
<prop key="hibernate.cache.provider_class">
org.hibernate.cache.HashtableCacheProvider
</prop>
<!--
<prop key="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</prop>
<prop key="hibernate.connection.url">jdbc:oracle:thin:@192.168.1.6:1521:orcl</prop>
<prop key="hibernate.connection.username">king</prop>
<prop key="hibernate.connection.password">king</prop>
-->
<prop key="hibernate.connection.datasource">java:/michellev7</prop>
</props>
</property>
</bean>
<!-- TransactionManager -->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>
<bean id="parentDao" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<description>All Dao bean's parent bean, define the common sessionFactory property of Dao implements classes</description>
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="transactionProxy" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager" ref="parentDao"></property>
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED,-Exception</prop>
</props>
</property>
</bean>
<bean id="appDao" class="com.tpcorp.michelle.app.dao.AppDaoImpl" parent="parentDao"/>
<bean id="exportDao" class="com.tpcorp.michelle.excel.dao.ExportDaoImpl" parent="parentDao"/>
<bean id="unAppService" class="com.tpcorp.michelle.app.service.AppServiceImpl">
<property name="appDao" ref="appDao"/>
</bean>
<bean id="unExportService" class="com.tpcorp.michelle.excel.service.ExportServiceImpl">
<property name="exportDao" ref="exportDao"/>
</bean>
<!-- transaction Service -->
<bean id="appService" parent="transactionProxy">
<property name="target" ref="unAppService"></property>
</bean>
<bean id="exportService" parent="transactionProxy">
<property name="target" ref="unExportService"></property>
</bean>
</beans>
- Spring xml事务配置
- Spring基于XML配置事务
- spring配置事务application.xml
- spring aop xml配置事务
- Spring 在xml配置里配置事务
- Spring、Spring事务详解;使用XML配置事务
- spring 注解事务机制配置和xml事务配置
- Spring 采用基于XML方式配置事务
- Spring声明式事务XML配置
- spring配置事务之xml方式
- spring 事务一致性使用xml配置
- spring在xml中事务声明配置
- spring事务属性的xml格式配置
- Spring 基于xml配置方式的事务
- spring的编程式事务、XML配置事务、注解实现事务
- spring事务applicationContext.xml
- 又碰到问题了...附spring事务的xml配置
- spring+hibernate xml和注解方式配置事务
- Android adb setuid提权漏洞的分析
- Android 弹出对话框Dialog
- mysql数据转换的shell
- hjuodaashckkmd sdpasdfdsfikdfcxzs
- Beyond Compare 3 中文乱码解决
- Spring xml事务配置
- Android系统init.rc分析
- deep_c++:拷贝构造函数
- 聚类分析在用户分类中的应用
- 微信知识相关
- JS -- <table> 行号自增,前端动态生成的<tr>
- 禁止ViewPager左右滑动事件
- hdu 1255 覆盖的面积 (线段树 扫描线)
- 有一个数组,数组中有13个元素,先将该数组进行分组,每3个元素为一组,分为若干组,最后用一个数组统一管理这些分组.(动态开辟)