|
This change breaks JdbcMessagePropertiesCopyingTestCase.
Pablo
On Fri, Jul 27, 2012 at 2:01 PM, <[hidden email]> wrote:
- Revision
- 24684
- Author
- svacas
- Date
- 2012-07-27 12:01:50 -0500 (Fri, 27 Jul 2012)
Log Message
MULE-6366: JDBC Outbound endpoint, loss of session properties when outbound endpoint is request response
Modified Paths
Added Paths
Diff
Modified: branches/mule-3.2.x/transports/jdbc/src/main/java/org/mule/transport/jdbc/JdbcMessageDispatcher.java (24683 => 24684)
--- branches/mule-3.2.x/transports/jdbc/src/main/java/org/mule/transport/jdbc/JdbcMessageDispatcher.java 2012-07-27 16:03:45 UTC (rev 24683)
+++ branches/mule-3.2.x/transports/jdbc/src/main/java/org/mule/transport/jdbc/JdbcMessageDispatcher.java 2012-07-27 17:01:50 UTC (rev 24684)
@@ -63,7 +63,7 @@
SqlStatementStrategy strategy =
jdbcConnector.getSqlStatementStrategyFactory().create(statement, payload);
- return strategy.executeStatement(jdbcConnector, endpoint, event, event.getTimeout());
+ return strategy.executeStatement(jdbcConnector, endpoint, event, event.getTimeout()).createInboundMessage();
}
@Override
Added: branches/mule-3.2.x/transports/jdbc/src/test/java/org/mule/transport/jdbc/functional/JdbcSessionVarablesCopyingTestCase.java (0 => 24684)
--- branches/mule-3.2.x/transports/jdbc/src/test/java/org/mule/transport/jdbc/functional/JdbcSessionVarablesCopyingTestCase.java (rev 0)
+++ branches/mule-3.2.x/transports/jdbc/src/test/java/org/mule/transport/jdbc/functional/JdbcSessionVarablesCopyingTestCase.java 2012-07-27 17:01:50 UTC (rev 24684)
@@ -0,0 +1,61 @@
+/*
+ * $Id$
+ * --------------------------------------------------------------------------------------
+ * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.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.jdbc.functional;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import org.mule.DefaultMuleMessage;
+import org.mule.api.MuleMessage;
+import org.mule.module.client.MuleClient;
+import org.mule.transport.NullPayload;
+
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.junit.Test;
+import org.junit.runners.Parameterized.Parameters;
+
+public class JdbcSessionVarablesCopyingTestCase extends AbstractJdbcFunctionalTestCase
+{
+
+ public JdbcSessionVarablesCopyingTestCase(ConfigVariant variant, String configResources)
+ {
+ super(variant, configResources);
+ }
+
+ @Parameters
+ public static Collection<Object[]> parameters()
+ {
+ return Arrays.asList(new Object[][]{
+ {ConfigVariant.FLOW, "jdbc-session-variables-copying-flow.xml"}
+ });
+ }
+
+ @Test
+ public void testMessagePropertiesCopying() throws Exception
+ {
+ MuleClient client = new MuleClient(muleContext);
+
+ MuleMessage message = new DefaultMuleMessage(TEST_MESSAGE, muleContext);
+ // provide a valid type header so the JDBC query actually returns something
+ message.setOutboundProperty("type", 1);
+
+ MuleMessage result = client.send("vm://in", message);
+ assertNotNull(result);
+ assertNull(result.getExceptionPayload());
+ assertFalse(result.getPayload() instanceof NullPayload);
+ assertEquals("test", result.getSessionProperty("test"));
+ }
+
+}
Property changes on: branches/mule-3.2.x/transports/jdbc/src/test/java/org/mule/transport/jdbc/functional/JdbcSessionVarablesCopyingTestCase.java
___________________________________________________________________
Added: svn:keywords
Added: svn:eol-style
Added: svn:keywords
Added: svn:eol-style
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
|