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

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:NarayanaJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XAConnectionFactoryWrapper.class)
public NarayanaXAConnectionFactoryWrapper xaConnectionFactoryWrapper(
        TransactionManager transactionManager,
        NarayanaRecoveryManagerBean narayanaRecoveryManagerBean,
        NarayanaProperties narayanaProperties) {
    return new NarayanaXAConnectionFactoryWrapper(transactionManager,
            narayanaRecoveryManagerBean, narayanaProperties);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:HornetQXAConnectionFactoryConfiguration.java   
@Primary
@Bean(name = { "jmsConnectionFactory", "xaJmsConnectionFactory" })
public ConnectionFactory jmsConnectionFactory(ListableBeanFactory beanFactory,
        HornetQProperties properties, XAConnectionFactoryWrapper wrapper)
                throws Exception {
    return wrapper.wrapConnectionFactory(
            new HornetQConnectionFactoryFactory(beanFactory, properties)
                    .createConnectionFactory(
                            SpringBootHornetQXAConnectionFactory.class));
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ArtemisXAConnectionFactoryConfiguration.java   
@Primary
@Bean(name = { "jmsConnectionFactory", "xaJmsConnectionFactory" })
public ConnectionFactory jmsConnectionFactory(ListableBeanFactory beanFactory,
        ArtemisProperties properties, XAConnectionFactoryWrapper wrapper)
                throws Exception {
    return wrapper.wrapConnectionFactory(
            new ArtemisConnectionFactoryFactory(beanFactory, properties)
                    .createConnectionFactory(ActiveMQXAConnectionFactory.class));
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ActiveMQXAConnectionFactoryConfiguration.java   
@Primary
@Bean(name = { "jmsConnectionFactory", "xaJmsConnectionFactory" })
public ConnectionFactory jmsConnectionFactory(ActiveMQProperties properties,
        XAConnectionFactoryWrapper wrapper) throws Exception {
    ActiveMQXAConnectionFactory connectionFactory = new ActiveMQConnectionFactoryFactory(
            properties).createConnectionFactory(ActiveMQXAConnectionFactory.class);
    return wrapper.wrapConnectionFactory(connectionFactory);
}
项目: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);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JtaAutoConfigurationTests.java   
@Bean
public ConnectionFactory pooledConnectionFactory(
        XAConnectionFactoryWrapper wrapper) throws Exception {
    XAConnectionFactory connectionFactory = mock(XAConnectionFactory.class);
    XAConnection connection = mock(XAConnection.class);
    XASession session = mock(XASession.class);
    TemporaryQueue queue = mock(TemporaryQueue.class);
    XAResource resource = mock(XAResource.class);
    given(connectionFactory.createXAConnection()).willReturn(connection);
    given(connection.createXASession()).willReturn(session);
    given(session.createTemporaryQueue()).willReturn(queue);
    given(session.getXAResource()).willReturn(resource);
    return wrapper.wrapConnectionFactory(connectionFactory);
}
项目:spring-boot-concourse    文件:NarayanaJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XAConnectionFactoryWrapper.class)
public NarayanaXAConnectionFactoryWrapper xaConnectionFactoryWrapper(
        TransactionManager transactionManager,
        NarayanaRecoveryManagerBean narayanaRecoveryManagerBean,
        NarayanaProperties narayanaProperties) {
    return new NarayanaXAConnectionFactoryWrapper(transactionManager,
            narayanaRecoveryManagerBean, narayanaProperties);
}
项目:spring-boot-concourse    文件:HornetQXAConnectionFactoryConfiguration.java   
@Primary
@Bean(name = { "jmsConnectionFactory", "xaJmsConnectionFactory" })
public ConnectionFactory jmsConnectionFactory(ListableBeanFactory beanFactory,
        HornetQProperties properties, XAConnectionFactoryWrapper wrapper)
                throws Exception {
    return wrapper.wrapConnectionFactory(
            new HornetQConnectionFactoryFactory(beanFactory, properties)
                    .createConnectionFactory(HornetQXAConnectionFactory.class));
}
项目:spring-boot-concourse    文件:ArtemisXAConnectionFactoryConfiguration.java   
@Primary
@Bean(name = { "jmsConnectionFactory", "xaJmsConnectionFactory" })
public ConnectionFactory jmsConnectionFactory(ListableBeanFactory beanFactory,
        ArtemisProperties properties, XAConnectionFactoryWrapper wrapper)
                throws Exception {
    return wrapper.wrapConnectionFactory(
            new ArtemisConnectionFactoryFactory(beanFactory, properties)
                    .createConnectionFactory(ActiveMQXAConnectionFactory.class));
}
项目:spring-boot-concourse    文件:ActiveMQXAConnectionFactoryConfiguration.java   
@Primary
@Bean(name = { "jmsConnectionFactory", "xaJmsConnectionFactory" })
public ConnectionFactory jmsConnectionFactory(ActiveMQProperties properties,
        XAConnectionFactoryWrapper wrapper) throws Exception {
    ActiveMQXAConnectionFactory connectionFactory = new ActiveMQConnectionFactoryFactory(
            properties).createConnectionFactory(ActiveMQXAConnectionFactory.class);
    return wrapper.wrapConnectionFactory(connectionFactory);
}
项目: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);
}
项目:spring-boot-concourse    文件:JtaAutoConfigurationTests.java   
@Bean
public ConnectionFactory pooledConnectionFactory(
        XAConnectionFactoryWrapper wrapper) throws Exception {
    XAConnectionFactory connectionFactory = mock(XAConnectionFactory.class);
    XAConnection connection = mock(XAConnection.class);
    XASession session = mock(XASession.class);
    TemporaryQueue queue = mock(TemporaryQueue.class);
    XAResource resource = mock(XAResource.class);
    given(connectionFactory.createXAConnection()).willReturn(connection);
    given(connection.createXASession()).willReturn(session);
    given(session.createTemporaryQueue()).willReturn(queue);
    given(session.getXAResource()).willReturn(resource);
    return wrapper.wrapConnectionFactory(connectionFactory);
}
项目:contestparser    文件:HornetQXAConnectionFactoryConfiguration.java   
@Primary
@Bean(name = { "jmsConnectionFactory", "xaJmsConnectionFactory" })
public ConnectionFactory jmsConnectionFactory(ListableBeanFactory beanFactory,
        HornetQProperties properties, XAConnectionFactoryWrapper wrapper)
                throws Exception {
    return wrapper.wrapConnectionFactory(
            new HornetQConnectionFactoryFactory(beanFactory, properties)
                    .createConnectionFactory(HornetQXAConnectionFactory.class));
}
项目:contestparser    文件:ArtemisXAConnectionFactoryConfiguration.java   
@Primary
@Bean(name = { "jmsConnectionFactory", "xaJmsConnectionFactory" })
public ConnectionFactory jmsConnectionFactory(ListableBeanFactory beanFactory,
        ArtemisProperties properties, XAConnectionFactoryWrapper wrapper)
                throws Exception {
    return wrapper.wrapConnectionFactory(
            new ArtemisConnectionFactoryFactory(beanFactory, properties)
                    .createConnectionFactory(ActiveMQXAConnectionFactory.class));
}
项目:contestparser    文件:ActiveMQXAConnectionFactoryConfiguration.java   
@Primary
@Bean(name = { "jmsConnectionFactory", "xaJmsConnectionFactory" })
public ConnectionFactory jmsConnectionFactory(ActiveMQProperties properties,
        XAConnectionFactoryWrapper wrapper) throws Exception {
    ActiveMQXAConnectionFactory connectionFactory = new ActiveMQConnectionFactoryFactory(
            properties).createConnectionFactory(ActiveMQXAConnectionFactory.class);
    return wrapper.wrapConnectionFactory(connectionFactory);
}
项目: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);
}
项目:contestparser    文件:JtaAutoConfigurationTests.java   
@Bean
public ConnectionFactory pooledConnectionFactory(
        XAConnectionFactoryWrapper wrapper) throws Exception {
    XAConnectionFactory connectionFactory = mock(XAConnectionFactory.class);
    XAConnection connection = mock(XAConnection.class);
    XASession session = mock(XASession.class);
    TemporaryQueue queue = mock(TemporaryQueue.class);
    XAResource resource = mock(XAResource.class);
    given(connectionFactory.createXAConnection()).willReturn(connection);
    given(connection.createXASession()).willReturn(session);
    given(session.createTemporaryQueue()).willReturn(queue);
    given(session.getXAResource()).willReturn(resource);
    return wrapper.wrapConnectionFactory(connectionFactory);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:AtomikosJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XAConnectionFactoryWrapper.class)
public AtomikosXAConnectionFactoryWrapper xaConnectionFactoryWrapper() {
    return new AtomikosXAConnectionFactoryWrapper();
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:BitronixJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XAConnectionFactoryWrapper.class)
public BitronixXAConnectionFactoryWrapper xaConnectionFactoryWrapper() {
    return new BitronixXAConnectionFactoryWrapper();
}
项目:spring-boot-concourse    文件:AtomikosJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XAConnectionFactoryWrapper.class)
public AtomikosXAConnectionFactoryWrapper xaConnectionFactoryWrapper() {
    return new AtomikosXAConnectionFactoryWrapper();
}
项目:spring-boot-concourse    文件:BitronixJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XAConnectionFactoryWrapper.class)
public BitronixXAConnectionFactoryWrapper xaConnectionFactoryWrapper() {
    return new BitronixXAConnectionFactoryWrapper();
}
项目:contestparser    文件:AtomikosJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XAConnectionFactoryWrapper.class)
public AtomikosXAConnectionFactoryWrapper xaConnectionFactoryWrapper() {
    return new AtomikosXAConnectionFactoryWrapper();
}
项目:contestparser    文件:BitronixJtaConfiguration.java   
@Bean
@ConditionalOnMissingBean(XAConnectionFactoryWrapper.class)
public BitronixXAConnectionFactoryWrapper xaConnectionFactoryWrapper() {
    return new BitronixXAConnectionFactoryWrapper();
}