<!--================ 装配事务管理器 ================-->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<!-- ==========================事务管理模板==================== -->
<bean id="baseTransaction"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
abstract="true">
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="transactionAttributes">
<props>
<prop key="insert*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED, -Exeptions</prop>
</props>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<!-- ==========================事务管理模板==================== -->
<bean id="baseTransaction"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
abstract="true">
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="transactionAttributes">
<props>
<prop key="insert*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED, -Exeptions</prop>
</props>
</property>
</bean>
解决方案 »
- spring JMS 与IBM MQ消息队列的问题
- seam 框架
- java socket 问题
- 域名注册谁会啊!
- 求助:收不到SOAP消息
- openadaptor中数据库组件SQLSource的问题(急出豆了)
- 请交一个struts结构中资源文件(就是:.properties 文件)的编码 命令。
- 公司要用JSF+Spring+Hibernate做项目,哪位有这些的资料给我看看吧
- 如何用JAVA实现断点续载?
- 写xml彧xhtml时,有时参考网上某个网址的DTD,可是这个网址上这个文件根本不存在...
- was内存上涨问题
- 在使用Eclipse 编辑Maven2项目的时候 无法将项目中的子类项目自动导入父项目中依赖的包库Maven Dependencies
<ref bean="transactionManager" />
</property>
这里是从上头注入bean<property name="transactionAttributes">
<props>
<prop key="insert*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED, -Exeptions</prop>
</props>
</property>我记得好像是拦截方法 以insert开头的事物使用的是 PROPAGATION_REQUIRED 必须开启事物
下面同理。。
好像是这个意思来的 好久不用了