diff options
Diffstat (limited to 'java/sca/modules/core')
2 files changed, 14 insertions, 2 deletions
diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl.java index 7dd9eb993a..b31a8e7d1a 100644 --- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl.java +++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeWireImpl.java @@ -52,6 +52,7 @@ import org.apache.tuscany.sca.invocation.Invoker; import org.apache.tuscany.sca.invocation.Message; import org.apache.tuscany.sca.invocation.MessageFactory; import org.apache.tuscany.sca.invocation.Phase; +import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.provider.BindingProviderFactory; import org.apache.tuscany.sca.provider.ImplementationProvider; import org.apache.tuscany.sca.provider.PolicyProvider; @@ -69,6 +70,7 @@ import org.apache.tuscany.sca.runtime.RuntimeWire; import org.apache.tuscany.sca.runtime.RuntimeWireProcessor; import org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint; import org.apache.tuscany.sca.work.WorkScheduler; +import org.oasisopen.sca.SCARuntimeException; import org.oasisopen.sca.ServiceRuntimeException; /** @@ -329,7 +331,11 @@ public class RuntimeWireImpl implements RuntimeWire { * is first used */ private void resolveEndpointReference(){ - endpointReferenceBuilder.runtimeBuild(endpointReference); + Problem problem = endpointReferenceBuilder.runtimeBuild(endpointReference); + + if (problem != null){ + throw new SCARuntimeException(problem.toString()); + } // set the endpoint based on the resolved endpoint endpoint = endpointReference.getTargetEndpoint(); diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java index 7ad4db79dc..21f907608c 100644 --- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java +++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java @@ -56,10 +56,12 @@ import org.apache.tuscany.sca.interfacedef.java.JavaInterface; import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.MonitorFactory; +import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentReference; import org.apache.tuscany.sca.runtime.RuntimeComponentService; import org.oasisopen.sca.RequestContext; +import org.oasisopen.sca.SCARuntimeException; import org.oasisopen.sca.ServiceReference; import org.oasisopen.sca.ServiceRuntimeException; @@ -361,7 +363,11 @@ public class ComponentContextImpl implements ComponentContextExt { componentReference.getEndpointReferences().add(endpointReference); // do binding matching - endpointReferenceBuilder.runtimeBuild(endpointReference); + Problem problem = endpointReferenceBuilder.runtimeBuild(endpointReference); + + if (problem != null){ + throw new SCARuntimeException(problem.toString()); + } return componentReference; } |