diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-07-11 10:54:38 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-07-11 10:54:38 +0000 |
commit | dbf4d8905d3dcee44dc2d54270a5979560ce7f37 (patch) | |
tree | a84449b62a3cc19b988bc688b29ae3eae19ede43 /sca-java-2.x/trunk/testing/itest/scabindingmapper/src | |
parent | f7e7402c450c81c4ca5a58adb7b3603db94a44f5 (diff) |
TUSCANY-3884 - Convert the default binding to delegate for local calls as well as remote calls. Means that the binding is more consistent in it's layout and the delegation selection logic is more cleanly separated from the code that handles passing messages.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1145118 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest/scabindingmapper/src')
-rw-r--r-- | sca-java-2.x/trunk/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java b/sca-java-2.x/trunk/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java index 016f744598..77c7cc0cbe 100644 --- a/sca-java-2.x/trunk/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java +++ b/sca-java-2.x/trunk/testing/itest/scabindingmapper/src/main/java/itest/scabindingmapper/MyMapper.java @@ -42,20 +42,30 @@ public class MyMapper extends DefaultSCABindingMapper { @Override protected QName chooseBinding(RuntimeEndpoint endpoint) { - if (endpoint.getComponent().getName().endsWith("2")) { - return JSONPBinding.TYPE; - } else { - return super.defaultMappedBinding; + QName bindingType = super.chooseBinding(endpoint); + + if (!bindingType.equals(super.defaultLocalBinding)) { + if (endpoint.getComponent().getName().endsWith("2")) { + bindingType = JSONPBinding.TYPE; + } else { + bindingType = super.defaultMappedBinding; + } } + return bindingType; } @Override protected QName chooseBinding(RuntimeEndpointReference endpointReference) { - if (endpointReference.getBinding().getURI().contains("Service2")) { - return JSONPBinding.TYPE; - } else { - return super.defaultMappedBinding; + QName bindingType = super.chooseBinding(endpointReference); + + if (!bindingType.equals(super.defaultLocalBinding)) { + if (endpointReference.getBinding().getURI().contains("Service2")) { + bindingType = JSONPBinding.TYPE; + } else { + bindingType = super.defaultMappedBinding; + } } + return bindingType; } /* |