summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-04-23 08:43:00 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-04-23 08:43:00 +0000
commitf642cbafd789b3a48df86b9f94905fb915e900ae (patch)
treed164b0bfbaabd03139cfb8e7e4acc24b887490a0 /sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src
parente97efed98a9e5a390dd7621bc8a43f9f656af52f (diff)
Add error checking
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@937190 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src')
-rw-r--r--sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src/main/java/org/apache/tuscany/sca/binding/hazelcast/ReferenceInvoker.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src/main/java/org/apache/tuscany/sca/binding/hazelcast/ReferenceInvoker.java b/sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src/main/java/org/apache/tuscany/sca/binding/hazelcast/ReferenceInvoker.java
index 9bef453992..a0a0071b61 100644
--- a/sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src/main/java/org/apache/tuscany/sca/binding/hazelcast/ReferenceInvoker.java
+++ b/sca-java-2.x/trunk/modules/binding-hazelcast-runtime/src/main/java/org/apache/tuscany/sca/binding/hazelcast/ReferenceInvoker.java
@@ -38,6 +38,7 @@ import org.apache.tuscany.sca.invocation.MessageFactory;
import org.apache.tuscany.sca.runtime.DomainRegistryFactory;
import org.apache.tuscany.sca.runtime.EndpointRegistry;
import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory;
+import org.oasisopen.sca.NoSuchServiceException;
import org.oasisopen.sca.ServiceRuntimeException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -71,6 +72,9 @@ public class ReferenceInvoker implements Invoker {
public Message invoke(Message msg) {
Member owningMember = hzRegistry.getOwningMember(serviceURI);
+ if (owningMember == null) {
+ throw new ServiceRuntimeException("service not found: " + serviceURI);
+ }
String requestXML = getRequestXML(msg);
Callable<String> callable = new ServiceInvoker(serviceURI, operation.getName(), requestXML);
FutureTask<String> task = new DistributedTask<String>(callable, owningMember);