Java 类org.springframework.transaction.support.ResourceTransactionManager 实例源码

项目:spring4-understanding    文件:AbstractPollingMessageListenerContainer.java   
@Override
public void initialize() {
    // Set sessionTransacted=true in case of a non-JTA transaction manager.
    if (!this.sessionTransactedCalled &&
            this.transactionManager instanceof ResourceTransactionManager &&
            !TransactionSynchronizationUtils.sameResourceFactory(
                    (ResourceTransactionManager) this.transactionManager, getConnectionFactory())) {
        super.setSessionTransacted(true);
    }

    // Use bean name as default transaction name.
    if (this.transactionDefinition.getName() == null) {
        this.transactionDefinition.setName(getBeanName());
    }

    // Proceed with superclass initialization.
    super.initialize();
}
项目:class-guard    文件:AbstractPollingMessageListenerContainer.java   
@Override
public void initialize() {
    // Set sessionTransacted=true in case of a non-JTA transaction manager.
    if (!this.sessionTransactedCalled &&
            this.transactionManager instanceof ResourceTransactionManager &&
            !TransactionSynchronizationUtils.sameResourceFactory(
                    (ResourceTransactionManager) this.transactionManager, getConnectionFactory())) {
        super.setSessionTransacted(true);
    }

    // Use bean name as default transaction name.
    if (this.transactionDefinition.getName() == null) {
        this.transactionDefinition.setName(getBeanName());
    }

    // Proceed with superclass initialization.
    super.initialize();
}
项目:cassandra-cf-service-boshrelease    文件:DataConfiguration.java   
@Bean
@Autowired
public ResourceTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
  return new JpaTransactionManager(entityManagerFactory);
}