From 8622a760ab5c3ded211809a2d8092f4008209397 Mon Sep 17 00:00:00 2001 From: rfeng Date: Thu, 19 Nov 2009 18:57:02 +0000 Subject: Enhance the PolicyBuilder interface to provide ability to validate and build git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@882246 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java | 4 +++- .../tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'java/sca/modules/core/src') diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java index e0722d3b76..a44e4a93b7 100644 --- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java +++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java @@ -454,6 +454,7 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint } public synchronized ServiceBindingProvider getBindingProvider() { + resolve(); if (bindingProvider == null) { BindingProviderFactory factory = (BindingProviderFactory)providerFactories.getProviderFactory(getBinding().getClass()); @@ -467,6 +468,7 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint } public synchronized List getPolicyProviders() { + resolve(); if (policyProviders == null) { policyProviders = new ArrayList(); for (PolicyProviderFactory factory : providerFactories.getPolicyProviderFactories()) { @@ -484,7 +486,7 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint } public Contract getContract() { - return service; + return getService(); } public CompositeContext getCompositeContext() { diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java index d38de90422..fe343e941d 100644 --- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java +++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java @@ -451,8 +451,7 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen } public Contract getContract() { - resolve(); - return reference; + return getReference(); } public CompositeContext getCompositeContext() { -- cgit v1.2.3