[Mulgara-svn] r223 - trunk/src/jar/resolver-distributed/java/org/mulgara/resolver/distributed

pag at mulgara.org pag at mulgara.org
Wed Apr 11 21:36:17 UTC 2007


Author: pag
Date: 2007-04-11 16:36:14 -0500 (Wed, 11 Apr 2007)
New Revision: 223

Modified:
   trunk/src/jar/resolver-distributed/java/org/mulgara/resolver/distributed/NetworkDelegator.java
Log:
Fixed bug in server URIs

Modified: trunk/src/jar/resolver-distributed/java/org/mulgara/resolver/distributed/NetworkDelegator.java
===================================================================
--- trunk/src/jar/resolver-distributed/java/org/mulgara/resolver/distributed/NetworkDelegator.java	2007-04-11 21:35:16 UTC (rev 222)
+++ trunk/src/jar/resolver-distributed/java/org/mulgara/resolver/distributed/NetworkDelegator.java	2007-04-11 21:36:14 UTC (rev 223)
@@ -176,7 +176,10 @@
     }
     String host = modelUri.getHost();
     if (ServerInfo.getHostnameAliases().contains(host)) {
-      throw new QueryException("Attempt to resolve a local model through the distributed resolver.");
+      // on the same machine.  Check if the server is different.
+      if (ServerInfo.getServerURI().getPath().equals(modelUri.getPath())) {
+        throw new QueryException("Attempt to resolve a local model through the distributed resolver.");
+      }
     }
   }
 
@@ -190,7 +193,7 @@
   protected Session getModelSession(URI modelUri) throws QueryException {
     try {
       // use the URI without the model fragment
-      return getServerSession(new URI(modelUri.getScheme(), modelUri.getSchemeSpecificPart(), ""));
+      return getServerSession(new URI(modelUri.getScheme(), modelUri.getSchemeSpecificPart(), null));
     } catch (URISyntaxException use) {
       throw new AssertionError(use);
     }




More information about the Mulgara-svn mailing list