Java 类org.springframework.boot.jta.XADataSourceWrapper 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:NarayanaJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XADataSourceWrapper.class)
public XADataSourceWrapper xaDataSourceWrapper(
        NarayanaRecoveryManagerBean narayanaRecoveryManagerBean,
        NarayanaProperties narayanaProperties) {
    return new NarayanaXADataSourceWrapper(narayanaRecoveryManagerBean,
            narayanaProperties);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JtaAutoConfigurationTests.java   
@Test
public void disableJtaSupport() {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context, "spring.jta.enabled:false");
    this.context.register(JtaAutoConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBeansOfType(JtaTransactionManager.class)).isEmpty();
    assertThat(this.context.getBeansOfType(XADataSourceWrapper.class)).isEmpty();
    assertThat(this.context.getBeansOfType(XAConnectionFactoryWrapper.class))
            .isEmpty();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JtaAutoConfigurationTests.java   
@Test
public void atomikosSanityCheck() throws Exception {
    this.context = new AnnotationConfigApplicationContext(JtaProperties.class,
            AtomikosJtaConfiguration.class);
    this.context.getBean(AtomikosProperties.class);
    this.context.getBean(UserTransactionService.class);
    this.context.getBean(UserTransactionManager.class);
    this.context.getBean(UserTransaction.class);
    this.context.getBean(XADataSourceWrapper.class);
    this.context.getBean(XAConnectionFactoryWrapper.class);
    this.context.getBean(AtomikosDependsOnBeanFactoryPostProcessor.class);
    this.context.getBean(JtaTransactionManager.class);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JtaAutoConfigurationTests.java   
@Test
public void bitronixSanityCheck() throws Exception {
    this.context = new AnnotationConfigApplicationContext(JtaProperties.class,
            BitronixJtaConfiguration.class);
    this.context.getBean(bitronix.tm.Configuration.class);
    this.context.getBean(TransactionManager.class);
    this.context.getBean(XADataSourceWrapper.class);
    this.context.getBean(XAConnectionFactoryWrapper.class);
    this.context.getBean(BitronixDependentBeanFactoryPostProcessor.class);
    this.context.getBean(JtaTransactionManager.class);
}
项目:spring-boot-concourse    文件:NarayanaJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XADataSourceWrapper.class)
public XADataSourceWrapper xaDataSourceWrapper(
        NarayanaRecoveryManagerBean narayanaRecoveryManagerBean,
        NarayanaProperties narayanaProperties) {
    return new NarayanaXADataSourceWrapper(narayanaRecoveryManagerBean,
            narayanaProperties);
}
项目:spring-boot-concourse    文件:JtaAutoConfigurationTests.java   
@Test
public void disableJtaSupport() {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context, "spring.jta.enabled:false");
    this.context.register(JtaAutoConfiguration.class);
    this.context.refresh();
    assertThat(this.context.getBeansOfType(JtaTransactionManager.class)).isEmpty();
    assertThat(this.context.getBeansOfType(XADataSourceWrapper.class)).isEmpty();
    assertThat(this.context.getBeansOfType(XAConnectionFactoryWrapper.class))
            .isEmpty();
}
项目:spring-boot-concourse    文件:JtaAutoConfigurationTests.java   
@Test
public void atomikosSanityCheck() throws Exception {
    this.context = new AnnotationConfigApplicationContext(JtaProperties.class,
            AtomikosJtaConfiguration.class);
    this.context.getBean(AtomikosProperties.class);
    this.context.getBean(UserTransactionService.class);
    this.context.getBean(UserTransactionManager.class);
    this.context.getBean(UserTransaction.class);
    this.context.getBean(XADataSourceWrapper.class);
    this.context.getBean(XAConnectionFactoryWrapper.class);
    this.context.getBean(AtomikosDependsOnBeanFactoryPostProcessor.class);
    this.context.getBean(JtaTransactionManager.class);
}
项目:spring-boot-concourse    文件:JtaAutoConfigurationTests.java   
@Test
public void bitronixSanityCheck() throws Exception {
    this.context = new AnnotationConfigApplicationContext(JtaProperties.class,
            BitronixJtaConfiguration.class);
    this.context.getBean(bitronix.tm.Configuration.class);
    this.context.getBean(TransactionManager.class);
    this.context.getBean(XADataSourceWrapper.class);
    this.context.getBean(XAConnectionFactoryWrapper.class);
    this.context.getBean(BitronixDependentBeanFactoryPostProcessor.class);
    this.context.getBean(JtaTransactionManager.class);
}
项目:contestparser    文件:JtaAutoConfigurationTests.java   
@Test
public void disableJtaSupport() {
    this.context = new AnnotationConfigApplicationContext();
    EnvironmentTestUtils.addEnvironment(this.context, "spring.jta.enabled:false");
    this.context.register(JtaAutoConfiguration.class);
    this.context.refresh();
    assertEquals(0, this.context.getBeansOfType(JtaTransactionManager.class).size());
    assertEquals(0, this.context.getBeansOfType(XADataSourceWrapper.class).size());
    assertEquals(0,
            this.context.getBeansOfType(XAConnectionFactoryWrapper.class).size());
}
项目:contestparser    文件:JtaAutoConfigurationTests.java   
@Test
public void atomikosSanityCheck() throws Exception {
    this.context = new AnnotationConfigApplicationContext(JtaProperties.class,
            AtomikosJtaConfiguration.class);
    this.context.getBean(AtomikosProperties.class);
    this.context.getBean(UserTransactionService.class);
    this.context.getBean(UserTransactionManager.class);
    this.context.getBean(UserTransaction.class);
    this.context.getBean(XADataSourceWrapper.class);
    this.context.getBean(XAConnectionFactoryWrapper.class);
    this.context.getBean(AtomikosDependsOnBeanFactoryPostProcessor.class);
    this.context.getBean(JtaTransactionManager.class);
}
项目:contestparser    文件:JtaAutoConfigurationTests.java   
@Test
public void bitronixSanityCheck() throws Exception {
    this.context = new AnnotationConfigApplicationContext(JtaProperties.class,
            BitronixJtaConfiguration.class);
    this.context.getBean(bitronix.tm.Configuration.class);
    this.context.getBean(TransactionManager.class);
    this.context.getBean(XADataSourceWrapper.class);
    this.context.getBean(XAConnectionFactoryWrapper.class);
    this.context.getBean(BitronixDependentBeanFactoryPostProcessor.class);
    this.context.getBean(JtaTransactionManager.class);
}
项目:orchestrator    文件:DatasourceConfig.java   
@Bean
@OrchestratorPersistenceUnit
@Primary
public DataSource dataSource(XADataSourceWrapper wrapper) throws Exception {
  XADataSource xaDataSource = createXaDataSource(orchestratorDataSourceProperties());
  return wrapper.wrapDataSource(xaDataSource);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:AtomikosJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XADataSourceWrapper.class)
public AtomikosXADataSourceWrapper xaDataSourceWrapper() {
    return new AtomikosXADataSourceWrapper();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:BitronixJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XADataSourceWrapper.class)
public BitronixXADataSourceWrapper xaDataSourceWrapper() {
    return new BitronixXADataSourceWrapper();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JtaAutoConfigurationTests.java   
@Bean
public DataSource pooledDataSource(XADataSourceWrapper wrapper) throws Exception {
    XADataSource dataSource = mock(XADataSource.class);
    return wrapper.wrapDataSource(dataSource);
}
项目:spring-boot-concourse    文件:AtomikosJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XADataSourceWrapper.class)
public AtomikosXADataSourceWrapper xaDataSourceWrapper() {
    return new AtomikosXADataSourceWrapper();
}
项目:spring-boot-concourse    文件:BitronixJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XADataSourceWrapper.class)
public BitronixXADataSourceWrapper xaDataSourceWrapper() {
    return new BitronixXADataSourceWrapper();
}
项目:spring-boot-concourse    文件:JtaAutoConfigurationTests.java   
@Bean
public DataSource pooledDataSource(XADataSourceWrapper wrapper) throws Exception {
    XADataSource dataSource = mock(XADataSource.class);
    return wrapper.wrapDataSource(dataSource);
}
项目:contestparser    文件:AtomikosJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XADataSourceWrapper.class)
public AtomikosXADataSourceWrapper xaDataSourceWrapper() {
    return new AtomikosXADataSourceWrapper();
}
项目:contestparser    文件:BitronixJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XADataSourceWrapper.class)
public BitronixXADataSourceWrapper xaDataSourceWrapper() {
    return new BitronixXADataSourceWrapper();
}
项目:contestparser    文件:JtaAutoConfigurationTests.java   
@Bean
public DataSource pooledDataSource(XADataSourceWrapper wrapper) throws Exception {
    XADataSource dataSource = mock(XADataSource.class);
    return wrapper.wrapDataSource(dataSource);
}
项目:orchestrator    文件:DatasourceConfig.java   
@Bean
@WorkflowPersistenceUnit
public DataSource workflowDataSource(XADataSourceWrapper wrapper) throws Exception {
  XADataSource xaDataSource = createXaDataSource(workflowDataSourceProperties());
  return wrapper.wrapDataSource(xaDataSource);
}