From b80b45fe8304f3a6e7cc910f1c0de90aac48298d Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 3 Oct 2011 07:17:31 +0000 Subject: TUSCANY-3957: Apply patch from Greg Dritschler to fix Endpoint references are not registered in domain registry git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1178311 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java | 7 +++++-- .../sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'sca-java-2.x/trunk/modules/core/src') diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java index 49c72aa267..c3cb51d8d1 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java @@ -630,7 +630,9 @@ public class CompositeActivatorImpl implements CompositeActivator { epr.isAsyncInvocation()){ // it's resolved so start it now try { - start(compositeContext, epr); + // The act of getting invocation chains starts the reference in the late binding case + // so just use that here + epr.getInvocationChains(); } catch (Throwable ex){ Monitor.error(monitor, this, "core-messages", "StartException", ex); rethrow(ex); @@ -650,7 +652,8 @@ public class CompositeActivatorImpl implements CompositeActivator { stop(epr); } } - + + @Deprecated public void start(CompositeContext compositeContext, RuntimeEndpointReference endpointReference) { compositeContext.getEndpointRegistry().addEndpointReference(endpointReference); diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java index 995b08e2c7..a912084bb9 100644 --- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java +++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java @@ -448,6 +448,10 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen } started = true; + + if (!getReference().getName().startsWith("$self$.")) + compositeContext.getEndpointRegistry().addEndpointReference(this); + // InterfaceContract bindingContract = getBindingInterfaceContract(); // endpoint.setInterfaceContract(bindingContract); } -- cgit v1.2.3