spring 与 hibernate 及事务的配置
来源:互联网 发布:邓超孙俪换脸哪个软件 编辑:程序博客网 时间:2024/05/09 09:47
spring 与hibernate 及事务的配置:
- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop"
- xmlns:context="http://www.springframework.org/schema/context" xmlns:jee="http://www.springframework.org/schema/jee"
- xmlns:tx="http://www.springframework.org/schema/tx"
- xsi:schemaLocation="
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
- http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
- <!-- Hibernate SessionFactory -->
- <bean id="hibernateSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
- <property name="dataSource">
- <ref bean="mysqldataSource1" />
- </property>
- <!--
- <property name="mappingResources">
- <list>
- <value>com/xh/hibernate/entity/User.hbm.xml</value>
- </list>
- </property
- -->
- <property name="mappingLocations">
- <list>
- <!--value>classpath:/com/company/club/**/*.hbm.xml</value-->
- </list>
- </property>
- <property name="hibernateProperties">
- <props>
- <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
- <prop key="hibernate.show_sql">true</prop>
- <prop key="hibernate.generate_statistics">true</prop>
- <prop key="hibernate.connection.release_mode">auto</prop>
- <prop key="hibernate.autoReconnect">true</prop>
- </props>
- </property>
- </bean>
- <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
- <property name="sessionFactory">
- <ref local="hibernateSessionFactory" />
- </property>
- </bean>
- <bean id="abstractTransactionProxy" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean" abstract="true">
- <property name="transactionManager" ref="transactionManager" />
- <property name="transactionAttributes">
- <props>
- <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
- <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
- <prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
- <!-- prop key="set*">PROPAGATION_REQUIRED,timeout_80</prop-->
- <prop key="save*">PROPAGATION_REQUIRED,timeout_80</prop>
- <prop key="create*">PROPAGATION_REQUIRED,timeout_80</prop>
- <prop key="update*">PROPAGATION_REQUIRED,timeout_80</prop>
- <prop key="delete*">PROPAGATION_REQUIRED,timeout_80</prop>
- <prop key="*">PROPAGATION_REQUIRED</prop>
- </props>
- </property>
- </bean>
- <!--
- 把事务配置在service层
- <bean id="daoTarget" class="a dao class impl " lazy-init="true">
- <property name="dataSource" ref="dataSource"/>
- </bean>
- <bean id="daoService" parent="abstractTransactionProxy">
- <property name="target" ref="daoTarget"/>
- </bean>
- -->
- </beans>
- spring 与 hibernate 及事务的配置
- spring 与 hibernate 集成事务配置
- Spring+Hibernate配置事务
- spring hibernate 事务配置
- 在Spring中配置Hibernate的事务
- Spring与Hibernate的整合,不配置事务管理器,事务会自动提交(Hibernate默认手动提交)
- Spring事务配置及事务的传播性与隔离级别详解
- Spring事务配置及事务的传播性与隔离级别详解
- Spring事务配置及事务的传播性与隔离级别详解
- Spring事务配置及事务的传播性与隔离级别详解
- Spring事务配置及事务的传播性与隔离级别详解
- Hibernate的事务与C3P0的配置
- struts+hibernate+spring事务配置
- struts+hibernate+spring事务配置
- struts+hibernate+spring事务配置
- struts+hibernate+spring事务配置
- Spring配置Hibernate框架事务
- Spring Hibernate事务配置总结
- 设置siteMapPath路径
- log4j配置syslog记录日志
- 在Windows Vista+IIS7中使用vs2005 调试.net2.0项目
- 中国惠普前总裁孙振耀谈工作与生活
- SGS 客户端协议解析
- spring 与 hibernate 及事务的配置
- ThreadLocal使用
- 检测当前网卡是否处于混杂模式 - Flier????s Sky - 博客园
- 在eclipse中安装jbpm插件进行可视化编辑及生成数据库脚本
- js 变更表结构
- 抛弃Acdsee,评论几款看图软件;呼唤能自动翻转照片的功能
- 中国政策的新自由主义特征
- XFire客户端的实现
- 雅虎本周将推全新网络开发者平台 提高流量