Search in sources :

Example 1 with JmsDestinationAccessor

use of org.springframework.jms.support.destination.JmsDestinationAccessor in project spring-integration by spring-projects.

the class JmsInboundGatewayParserTests method gatewayWithPubSubDomain.

@Test
public void gatewayWithPubSubDomain() {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("jmsGatewayWithPubSubDomain.xml", this.getClass());
    JmsMessageDrivenEndpoint endpoint = context.getBean("gateway", JmsMessageDrivenEndpoint.class);
    JmsDestinationAccessor container = (JmsDestinationAccessor) new DirectFieldAccessor(endpoint).getPropertyValue("listenerContainer");
    assertEquals(Boolean.TRUE, container.isPubSubDomain());
    context.close();
}
Also used : ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) DirectFieldAccessor(org.springframework.beans.DirectFieldAccessor) JmsMessageDrivenEndpoint(org.springframework.integration.jms.JmsMessageDrivenEndpoint) JmsDestinationAccessor(org.springframework.jms.support.destination.JmsDestinationAccessor) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DirectFieldAccessor (org.springframework.beans.DirectFieldAccessor)1 ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)1 JmsMessageDrivenEndpoint (org.springframework.integration.jms.JmsMessageDrivenEndpoint)1 JmsDestinationAccessor (org.springframework.jms.support.destination.JmsDestinationAccessor)1