use of jakarta.jms.ConnectionFactory in project spring-boot by spring-projects.
the class MyJmsConfiguration method myFactory.
@Bean
public DefaultJmsListenerContainerFactory myFactory(DefaultJmsListenerContainerFactoryConfigurer configurer) {
DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory();
ConnectionFactory connectionFactory = getCustomConnectionFactory();
configurer.configure(factory, connectionFactory);
factory.setMessageConverter(new MyMessageConverter());
return factory;
}
use of jakarta.jms.ConnectionFactory in project spring-boot by spring-projects.
the class ArtemisAutoConfigurationTests method nativeConnectionFactory.
@Test
void nativeConnectionFactory() {
this.contextRunner.withUserConfiguration(EmptyConfiguration.class).withPropertyValues("spring.artemis.mode:native").run((context) -> {
JmsTemplate jmsTemplate = context.getBean(JmsTemplate.class);
ConnectionFactory connectionFactory = getConnectionFactory(context);
assertThat(connectionFactory).isEqualTo(jmsTemplate.getConnectionFactory());
ActiveMQConnectionFactory activeMQConnectionFactory = getActiveMQConnectionFactory(connectionFactory);
assertNettyConnectionFactory(activeMQConnectionFactory, "localhost", 61616);
assertThat(activeMQConnectionFactory.getUser()).isNull();
assertThat(activeMQConnectionFactory.getPassword()).isNull();
});
}
use of jakarta.jms.ConnectionFactory in project spring-boot by spring-projects.
the class JndiConnectionFactoryAutoConfigurationTests method detectWithJmsXAConnectionFactory.
@Test
void detectWithJmsXAConnectionFactory() {
ConnectionFactory connectionFactory = configureConnectionFactory("java:/JmsXA");
this.contextRunner.run(assertConnectionFactory(connectionFactory));
}
use of jakarta.jms.ConnectionFactory in project spring-boot by spring-projects.
the class JndiConnectionFactoryAutoConfigurationTests method configureConnectionFactory.
private ConnectionFactory configureConnectionFactory(String name) {
ConnectionFactory connectionFactory = mock(ConnectionFactory.class);
TestableInitialContextFactory.bind(name, connectionFactory);
return connectionFactory;
}
use of jakarta.jms.ConnectionFactory in project spring-boot by spring-projects.
the class JndiConnectionFactoryAutoConfigurationTests method jndiNamePropertySetWithResourceRef.
@Test
void jndiNamePropertySetWithResourceRef() {
ConnectionFactory connectionFactory = configureConnectionFactory("java:comp/env/myCF");
this.contextRunner.withPropertyValues("spring.jms.jndi-name=myCF").run(assertConnectionFactory(connectionFactory));
}
Aggregations