Search in sources :

Example 11 with SubscribableJmsChannel

use of org.springframework.integration.jms.SubscribableJmsChannel in project spring-integration by spring-projects.

the class JmsChannelParserTests method topicNameWithResolverChannel.

@Test
public void topicNameWithResolverChannel() {
    assertEquals(SubscribableJmsChannel.class, topicNameWithResolverChannel.getClass());
    SubscribableJmsChannel channel = (SubscribableJmsChannel) topicNameWithResolverChannel;
    DirectFieldAccessor accessor = new DirectFieldAccessor(channel);
    JmsTemplate jmsTemplate = (JmsTemplate) accessor.getPropertyValue("jmsTemplate");
    AbstractMessageListenerContainer container = (AbstractMessageListenerContainer) accessor.getPropertyValue("container");
    assertEquals("foo", jmsTemplate.getDefaultDestinationName());
    assertEquals("foo", container.getDestinationName());
}
Also used : SubscribableJmsChannel(org.springframework.integration.jms.SubscribableJmsChannel) DirectFieldAccessor(org.springframework.beans.DirectFieldAccessor) JmsTemplate(org.springframework.jms.core.JmsTemplate) AbstractMessageListenerContainer(org.springframework.jms.listener.AbstractMessageListenerContainer) Test(org.junit.Test)

Aggregations

SubscribableJmsChannel (org.springframework.integration.jms.SubscribableJmsChannel)11 Test (org.junit.Test)10 DirectFieldAccessor (org.springframework.beans.DirectFieldAccessor)9 JmsTemplate (org.springframework.jms.core.JmsTemplate)7 AbstractMessageListenerContainer (org.springframework.jms.listener.AbstractMessageListenerContainer)7 List (java.util.List)2 ChannelInterceptor (org.springframework.messaging.support.ChannelInterceptor)2 MessageHistory (org.springframework.integration.history.MessageHistory)1 PollableJmsChannel (org.springframework.integration.jms.PollableJmsChannel)1 DefaultMessageListenerContainer (org.springframework.jms.listener.DefaultMessageListenerContainer)1 Message (org.springframework.messaging.Message)1 GenericMessage (org.springframework.messaging.support.GenericMessage)1