diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/core/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java index 177221586b..62d7750fe1 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java @@ -363,13 +363,13 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder { // find the first callback endpoint that matches a callback endpoint reference // at the service - RuntimeEndpoint matchedEndpoint = null; + RuntimeEndpoint callbackEndpoint = null; match: for ( EndpointReference callbackEndpointReference : endpointReference.getTargetEndpoint().getCallbackEndpointReferences()){ for (Endpoint endpoint : callbackService.getEndpoints()){ if (haveMatchingPolicy(callbackEndpointReference, endpoint, matchAudit) && haveMatchingInterfaceContracts(callbackEndpointReference, endpoint, matchAudit)){ - matchedEndpoint = (RuntimeEndpoint)endpoint; + callbackEndpoint = (RuntimeEndpoint)endpoint; break match; } } @@ -381,13 +381,13 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder { // callback that is different from the forward binding. Waiting for feedback form OASIS // before doing more drastic surgery to fix this corner case as there are other things // wrong with the default case, such as what to do about policy - if (matchedEndpoint == null || - (matchedEndpoint.getBinding().getType().equals(SCABinding.TYPE) && + if (callbackEndpoint == null || + (callbackEndpoint.getBinding().getType().equals(SCABinding.TYPE) && !endpointReference.getBinding().getType().equals(SCABinding.TYPE))){ // no endpoint in place so we need to create one - matchedEndpoint = (RuntimeEndpoint)assemblyFactory.createEndpoint(); - matchedEndpoint.setComponent(endpointReference.getComponent()); - matchedEndpoint.setService(callbackService); + callbackEndpoint = (RuntimeEndpoint)assemblyFactory.createEndpoint(); + callbackEndpoint.setComponent(endpointReference.getComponent()); + callbackEndpoint.setService(callbackService); Binding forwardBinding = endpointReference.getBinding(); Binding callbackBinding = null; @@ -411,25 +411,25 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder { } } - matchedEndpoint.setBinding(callbackBinding); + callbackEndpoint.setBinding(callbackBinding); callbackService.getBindings().add(callbackBinding); - matchedEndpoint.setUnresolved(false); - callbackService.getEndpoints().add(matchedEndpoint); + callbackEndpoint.setUnresolved(false); + callbackService.getEndpoints().add(callbackEndpoint); // build it - build(matchedEndpoint); + build(callbackEndpoint); // activate it compositeActivator.activate(((RuntimeEndpointReferenceImpl)endpointReference).getCompositeContext(), - matchedEndpoint); + callbackEndpoint); // start it compositeActivator.start(((RuntimeEndpointReferenceImpl)endpointReference).getCompositeContext(), - matchedEndpoint); + callbackEndpoint); } - endpointReference.setCallbackEndpoint(matchedEndpoint); + endpointReference.setCallbackEndpoint(callbackEndpoint); } private void build(Endpoint endpoint) { |