diff options
author | scottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-04 16:09:37 +0000 |
---|---|---|
committer | scottkurz <scottkurz@13f79535-47bb-0310-9956-ffa450edef68> | 2009-05-04 16:09:37 +0000 |
commit | 5f9e424027713e85c5b2b669f14fd6c20393d518 (patch) | |
tree | 6b715e269859bdb291d4496e330069c0d20588fb /branches/sca-java-1.x/modules | |
parent | 3b5d3b84eebcf28da41048372d47fe19a9d51643 (diff) |
Set context for mediateFault as well.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@771345 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules')
-rw-r--r-- | branches/sca-java-1.x/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java b/branches/sca-java-1.x/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java index 3594aea139..7e441e43b3 100644 --- a/branches/sca-java-1.x/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java +++ b/branches/sca-java-1.x/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java @@ -337,8 +337,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; @@ -358,6 +369,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 |