diff options
author | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-30 23:45:33 +0000 |
---|---|---|
committer | nash <nash@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-30 23:45:33 +0000 |
commit | 1a6c59e5a31989365ba114b80bd017cd18dd770d (patch) | |
tree | afd59183a35894cdf548e089276cd1de5afc20fa /branches/sca-java-1.5.1/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding | |
parent | e27e42510782dca9b307b33b35eb1450a6cf3be8 (diff) |
Fix TUSCANY-3170 (add callback URI configuration support to domain manager) and add itest/domainmgr/callback test case
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@799472 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.5.1/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding')
-rw-r--r-- | branches/sca-java-1.5.1/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/RuntimeSCAReferenceBindingProvider.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/branches/sca-java-1.5.1/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/RuntimeSCAReferenceBindingProvider.java b/branches/sca-java-1.5.1/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/RuntimeSCAReferenceBindingProvider.java index 850fd77e96..fa5a9b062b 100644 --- a/branches/sca-java-1.5.1/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/RuntimeSCAReferenceBindingProvider.java +++ b/branches/sca-java-1.5.1/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/RuntimeSCAReferenceBindingProvider.java @@ -126,7 +126,7 @@ public class RuntimeSCAReferenceBindingProvider implements ReferenceBindingProvi private ReferenceBindingProvider getDistributedProvider() { - if (isTargetRemote()) { + if (isTargetRemote() || isRemotableCallback()) { // initialize the remote provider if it hasn't been done already if (distributedProvider == null) { if (reference.getInterfaceContract() != null && !reference.getInterfaceContract().getInterface().isRemotable()) { @@ -155,6 +155,22 @@ public class RuntimeSCAReferenceBindingProvider implements ReferenceBindingProvi return distributedProvider; } + /* + * This test is needed to make sure the distributed binding provider + * is started and stopped if this is a callback binding that might + * need to make a remote invocation. + */ + private boolean isRemotableCallback() { + if (reference.isCallback() && + reference.getInterfaceContract() != null && + reference.getInterfaceContract().getInterface().isRemotable() && + distributedProviderFactory != null) { + return true; + } else { + return false; + } + } + public InterfaceContract getBindingInterfaceContract() { if (isTargetRemote()) { return getDistributedProvider().getBindingInterfaceContract(); |