SSH框架集成後XML配置事物管理

<bean id="txManager"
		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>
	
	<tx:advice id="txAdvice" transaction-manager="txManager">
		<tx:attributes>
			<tx:method name="*" propagation="REQUIRED" />
		</tx:attributes>
	</tx:advice>
	
	<aop:config>
		<aop:pointcut id="serviceMethods" expression="execution(* com.t97.biz.*.*(..))" />
		<aop:advisor pointcut-ref="serviceMethods" advice-ref="txAdvice" />
	</aop:config>
	
	<bean id="daoSupport" class="org.springframework.orm.hibernate3.support.HibernateDaoSupport" abstract="true">
		<property name="sessionFactory" ref="sessionFactory"></property>
	</bean>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章