JDBD数据源局部:
<bean id="trancsactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager>
<property name="dataSource" ref="dataSource"/>
</bean>
JTA数据源全局:
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jdbc/jpetstore"/>
</bean>
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"/>
Hibernate 局部事务策略
<bean id="trancsactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
Hibernate 全局事务策略
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"/>
posted on 2008-05-18 14:36
长春语林科技 阅读(428)
评论(0) 编辑 收藏 所属分类:
spring