日期:2014-05-17 浏览次数:20760 次
@Transactional("test")
public int insertTest(TestUserEntity userEntity,TestIdEntity idEntity)
{
int ret = 0;
this.testUserDao.insertTestUser(userEntity);
ret = this.testIdDao.insertIdDao(idEntity);//特意失败
return ret;
}
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
<qualifier value="home"/>
</bean>
<bean id="transactionManager_test" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource_test" />
<qualifier value="test"/>
</bean>
<tx:annotation-driven order= "2"/>
</bean>