use of org.springframework.jms.listener.endpoint.JmsActivationSpecConfig in project spring-framework by spring-projects.
the class JmsListenerEndpointTests method setupJcaMessageContainerFullConfig.
@Test
public void setupJcaMessageContainerFullConfig() {
JmsMessageEndpointManager container = new JmsMessageEndpointManager();
MessageListener messageListener = new MessageListenerAdapter();
SimpleJmsListenerEndpoint endpoint = new SimpleJmsListenerEndpoint();
endpoint.setDestination("myQueue");
endpoint.setSelector("foo = 'bar'");
endpoint.setSubscription("mySubscription");
endpoint.setConcurrency("10");
endpoint.setMessageListener(messageListener);
endpoint.setupListenerContainer(container);
JmsActivationSpecConfig config = container.getActivationSpecConfig();
assertEquals("myQueue", config.getDestinationName());
assertEquals("foo = 'bar'", config.getMessageSelector());
assertEquals("mySubscription", config.getSubscriptionName());
assertEquals(10, config.getMaxConcurrency());
assertEquals(messageListener, container.getMessageListener());
}
use of org.springframework.jms.listener.endpoint.JmsActivationSpecConfig in project spring-framework by spring-projects.
the class JmsListenerContainerFactoryTests method assertDefaultJcaConfig.
private void assertDefaultJcaConfig(JmsMessageEndpointManager container) {
assertEquals(messageConverter, container.getMessageConverter());
assertEquals(destinationResolver, container.getDestinationResolver());
JmsActivationSpecConfig config = container.getActivationSpecConfig();
assertNotNull(config);
assertEquals(Session.DUPS_OK_ACKNOWLEDGE, config.getAcknowledgeMode());
assertEquals(true, config.isPubSubDomain());
assertEquals(true, config.isSubscriptionDurable());
assertEquals("client-1234", config.getClientId());
}
Aggregations