summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-05-04 16:44:57 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-05-04 16:44:57 +0000
commite1458bab2b33caed82b2fce7bcc3f8781df58b1b (patch)
tree9c107422328013559203f469acb2f73ffa3764e1
parent5f9e424027713e85c5b2b669f14fd6c20393d518 (diff)
Merge the change from 1.x
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@771356 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java
index 05ab381cc9..1c90446702 100644
--- a/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java
+++ b/java/sca/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java
@@ -338,8 +338,19 @@ public class MediatorImpl implements Mediator {
throw new ServiceRuntimeException(cause);
}
+ Map<String, Object> context = new HashMap<String, Object>();
+ if (metadata != null) {
+ context.putAll(metadata);
+ }
+ if (targetOperation != null) {
+ context.put(SOURCE_OPERATION, targetOperation);
+ }
+ if (sourceOperation != null) {
+ context.put(TARGET_OPERATION, sourceOperation);
+ }
+
Object newResult =
- transformException(result, targetDataType, sourceDataType, targetFaultType, sourceFaultType, metadata);
+ transformException(result, targetDataType, sourceDataType, targetFaultType, sourceFaultType, context);
return newResult;
@@ -359,6 +370,9 @@ public class MediatorImpl implements Mediator {
}
/**
+ * Assumes we're going from target-to-source, knowing that we're sending BACK an output response, rather than the more
+ * obvious source-to-target.
+ *
* @param output
* @param sourceOperation
* @param targetOperation