Issue Details (XML | Word | Printable)

Key: MULE-3314
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Daniel Feist
Reporter: Daniel Feist
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Mule

Response messages in remoteSync=false scenarios are corrupted by transformations that happen in outbound phase

Created: 08/May/08 08:49 AM   Updated: 09/Jun/08 02:04 PM
Component/s: Core: (other), Core: Transformers
Affects Version/s: 2.0.0, 2.0.1
Fix Version/s: 2.0 ITR2, 2.0.2

Time Tracking:
Original Estimate: 5 hours
Original Estimate - 5 hours
Remaining Estimate: 0 minutes
Time Spent - 6 hours
Time Spent: 6 hours
Time Spent - 6 hours

Issue Links:
Related
 

Labels:
User impact: High
Effort points: 0.5


 Description  « Hide
Unless remoteSync is true outbound routers should always return null.
If outbound router returns null then the service returns the result of component invocation to inbound endpoint to send the response.
This is all happening, but the message that gets returned to inbound endpoint for response is corrupted by transformations that happen on the out-only endpoints.

i think its just the fact that transform() methods now transform underlying message and don't just return transformed result... and this slipped through.

Looks like we need to create a copy of message to be used be outbound router collection... (more message copying )

This can be reproduced with the following test case:
org.mule.test.integration.streaming.JmsStreamMessageTestCase (probably should move this test elsewhere as this is unrelated to streaming)



 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Daniel Feist added a comment - 15/May/08 06:51 AM
Can you comment on this please Ross?

Ross Mason added a comment - 15/May/08 09:02 AM
I think there is a wider issue here (though I don't fully understand form your description). I goes back to the Messaging styles and the behaviour we expect from each. I took a look at the diagrams that you did, but I don't think they are accurate. We need to define each message style, it's variations and come up with consistent rules abuout what happens in each scenario.

Daniel Feist added a comment - 18/May/08 12:30 PM
Agreed. Even so I'm convinced there is a bug here such that one of the messaging styles is not behaving as it should be and as it used to in 1.4 due to some messaging api changes. We'll need to fix this in the short term. I'll try to update this issue with a better description of the bug, and reference the failing test case.

Daniel Feist added a comment - 23/May/08 08:06 AM
This patch fixes the issue, but it's more message copying..
Index: /Users/dfeist/MULE/2.0.X_BRANCH/core/src/main/java/org/mule/service/AbstractService.java
===================================================================
--- /Users/dfeist/MULE/2.0.X_BRANCH/core/src/main/java/org/mule/service/AbstractService.java	(revision 11844)
+++ /Users/dfeist/MULE/2.0.X_BRANCH/core/src/main/java/org/mule/service/AbstractService.java	(working copy)
@@ -10,6 +10,7 @@
 
 package org.mule.service;
 
+import org.mule.DefaultMuleMessage;
 import org.mule.OptimizedRequestContext;
 import org.mule.api.MessagingException;
 import org.mule.api.MuleContext;
@@ -875,7 +876,7 @@
         {
             if (getOutboundRouter().hasEndpoints())
             {
-                getOutboundRouter().route(result, event.getSession(), event.isSynchronous());
+                getOutboundRouter().route(new DefaultMuleMessage(result), event.getSession(), event.isSynchronous());
             }
         }
     }
@@ -890,7 +891,7 @@
         {
             if (getOutboundRouter().hasEndpoints())
             {
-                MuleMessage outboundReturnMessage = getOutboundRouter().route(result, event.getSession(),
+                MuleMessage outboundReturnMessage = getOutboundRouter().route(new DefaultMuleMessage(result), event.getSession(),
                     event.isSynchronous());
                 if (outboundReturnMessage != null)
                 {