private void processAndReplyWithSendTo(MessagingMessageListenerAdapter listener, String replyDestinationName, boolean pubSubDomain) throws JMSException { processAndReplyWithSendTo(listener, replyDestinationName, pubSubDomain, null); }
@Test public void processAndReplyWithDefaultSendTo() throws JMSException { MessagingMessageListenerAdapter listener = createDefaultInstance(String.class); processAndReplyWithSendTo(listener, "defaultReply", false); assertDefaultListenerMethodInvocation(); }
@Test public void processAndReplyWithSendToQueue() throws JMSException { String methodName = "processAndReplyWithSendTo"; SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(); MessagingMessageListenerAdapter listener = createInstance(this.factory, getListenerMethod(methodName, String.class), container); processAndReplyWithSendTo(listener, "replyDestination", false); assertListenerMethodInvocation(this.sample, methodName); }
@Test public void processFromQueueAndReplyWithSendToTopic() throws JMSException { String methodName = "processAndReplyWithSendTo"; SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(); container.setReplyPubSubDomain(true); MessagingMessageListenerAdapter listener = createInstance(this.factory, getListenerMethod(methodName, String.class), container); processAndReplyWithSendTo(listener, "replyDestination", true); assertListenerMethodInvocation(this.sample, methodName); }
@Test public void processAndReplyWithSendToTopic() throws JMSException { String methodName = "processAndReplyWithSendTo"; SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(); container.setPubSubDomain(true); MessagingMessageListenerAdapter listener = createInstance(this.factory, getListenerMethod(methodName, String.class), container); processAndReplyWithSendTo(listener, "replyDestination", true); assertListenerMethodInvocation(this.sample, methodName); }
@Test public void processAndReplyWithNullReplyQosSettings() throws JMSException { String methodName = "processAndReplyWithSendTo"; SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(); container.setReplyQosSettings(null); MessagingMessageListenerAdapter listener = createInstance(this.factory, getListenerMethod(methodName, String.class), container); processAndReplyWithSendTo(listener, "replyDestination", false); assertListenerMethodInvocation(this.sample, methodName); }
@Test public void processFromTopicAndReplyWithSendToQueue() throws JMSException { String methodName = "processAndReplyWithSendTo"; SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(); container.setPubSubDomain(true); container.setReplyPubSubDomain(false); MessagingMessageListenerAdapter listener = createInstance(this.factory, getListenerMethod(methodName, String.class), container); processAndReplyWithSendTo(listener, "replyDestination", false); assertListenerMethodInvocation(this.sample, methodName); }
@Test public void processAndReplyWithCustomReplyQosSettings() throws JMSException { String methodName = "processAndReplyWithSendTo"; SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(); QosSettings replyQosSettings = new QosSettings(1, 6, 6000); container.setReplyQosSettings(replyQosSettings); MessagingMessageListenerAdapter listener = createInstance(this.factory, getListenerMethod(methodName, String.class), container); processAndReplyWithSendTo(listener, "replyDestination", false, replyQosSettings); assertListenerMethodInvocation(this.sample, methodName); }