@Test public void gatewayWithReplyChannel() { ActiveMqTestUtils.prepare(); ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("jmsGatewayWithReplyChannel.xml", this.getClass()); JmsMessageDrivenEndpoint gateway = (JmsMessageDrivenEndpoint) context.getBean("gateway"); Object replyChannel = TestUtils.getPropertyValue(gateway, "listener.gatewayDelegate.replyChannel"); assertEquals(context.getBean("replies"), replyChannel); JmsTemplate template = new JmsTemplate(context.getBean(ConnectionFactory.class)); template.convertAndSend("testDestination", "Hello"); assertNotNull(template.receive("testReplyDestination")); }
public static void main(String[] args) { ActiveMqTestUtils.prepare(); new ClassPathXmlApplicationContext(configFiles, ChannelAdapterDemo.class); System.out.println("Please type something and hit return"); }