Travis,
This should be a switch on the jms connector, otherwise the behavior is inconsistent with other transports.
Andrew
On Oct 14, 2009 1:22 PM, <tcarlson@...> wrote:
- Revision
- 15832
- Author
- tcarlson
- Date
- 2009-10-14 15:22:28 -0500 (Wed, 14 Oct 2009)
Log Message
Fix for EE-1688/MULE-3059
Modified Paths
Added Paths
Diff
Modified: branches/mule-2.2.x/transports/jms/src/main/java/org/mule/transport/jms/JmsMessageDispatcher.java (15831 => 15832)
--- branches/mule-2.2.x/transports/jms/src/main/java/org/mule/transport/jms/JmsMessageDispatcher.java 2009-10-14 20:19:19 UTC (rev 15831)
+++ branches/mule-2.2.x/transports/jms/src/main/java/org/mule/transport/jms/JmsMessageDispatcher.java 2009-10-14 20:22:28 UTC (rev 15832)
@@ -286,7 +286,7 @@
}
}
- return new DefaultMuleMessage(NullPayload.getInstance());
+ return new DefaultMuleMessage(msg);
}
finally
{
Added: branches/mule-2.2.x/transports/jms/src/test/java/org/mule/transport/jms/integration/JmsSynchronousResponseTestCase.java (0 => 15832)
--- branches/mule-2.2.x/transports/jms/src/test/java/org/mule/transport/jms/integration/JmsSynchronousResponseTestCase.java (rev 0)
+++ branches/mule-2.2.x/transports/jms/src/test/java/org/mule/transport/jms/integration/JmsSynchronousResponseTestCase.java 2009-10-14 20:22:28 UTC (rev 15832)
@@ -0,0 +1,49 @@
+/*
+ * $Id$
+ * --------------------------------------------------------------------------------------
+ * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
+ *
+ * The software in this package is published under the terms of the CPAL v1.0
+ * license, a copy of which has been included with this distribution in the
+ * LICENSE.txt file.
+ */
+
+package org.mule.transport.jms.integration;
+
+import org.mule.api.MuleMessage;
+import org.mule.module.client.MuleClient;
+import org.mule.transport.NullPayload;
+import org.mule.util.StringUtils;
+
+
+/**
+ * @see EE-1688/MULE-3059
+ */
+public class JmsSynchronousResponseTestCase extends AbstractJmsFunctionalTestCase
+{
+ @Override
+ protected String getConfigResources()
+ {
+ return "integration/jms-synchronous-response.xml";
+ }
+
+ public void testResponseWithoutReplyTo() throws Exception
+ {
+ MuleClient client = new MuleClient();
+
+ MuleMessage response = client.send("out1", "TEST_MESSAGE", null);
+ assertNotNull(response);
+ assertTrue("Response is not a JMS Message", response.getPayload() instanceof javax.jms.Message);
+ String messageId = ((javax.jms.Message) response.getPayload()).getJMSMessageID();
+ assertTrue("JMSMessageID is missing", StringUtils.isNotBlank(messageId));
+ }
+
+ public void testResponseWithReplyTo() throws Exception
+ {
+ MuleClient client = new MuleClient();
+
+ MuleMessage response = client.send("out2", "TEST_MESSAGE", null);
+ assertNotNull(response);
+ assertTrue("Response should be NullPayload", response.getPayload() instanceof NullPayload);
+ }
+}
Property changes on: branches/mule-2.2.x/transports/jms/src/test/java/org/mule/transport/jms/integration/JmsSynchronousResponseTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email