diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-06 07:09:42 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-06 07:09:42 +0000 |
commit | df6da250dee78ff6f6c43096b26d4793087b0b99 (patch) | |
tree | 7da2f0751e2b427ef104f85f2066f15bfdb9d6b6 /java/sca | |
parent | 72ea9bccd4c46344a212fec637b71d2b34f6125d (diff) |
Use lookup instead of list
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@741443 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r-- | java/sca/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/DefaultRMIHost.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/sca/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/DefaultRMIHost.java b/java/sca/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/DefaultRMIHost.java index 359ef488d4..fe15bb59fe 100644 --- a/java/sca/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/DefaultRMIHost.java +++ b/java/sca/modules/host-rmi/src/main/java/org/apache/tuscany/sca/host/rmi/DefaultRMIHost.java @@ -55,10 +55,12 @@ public class DefaultRMIHost implements RMIHost { if (registry == null) { try { registry = LocateRegistry.getRegistry(rmiURI.port); - registry.list(); + registry.lookup(rmiURI.serviceName); } catch (RemoteException e) { registry = LocateRegistry.createRegistry(rmiURI.port); - } + } catch (NotBoundException e) { + // Ignore + } rmiRegistries.put(Integer.toString(rmiURI.port), registry); } registry.bind(rmiURI.serviceName, serviceObject); |