Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blewitt2011-06-18 16:58:20 +0000
committerMarkus Alexander Kuppe2011-06-18 16:58:20 +0000
commiteeb496aedb04468ad11cede4347343d6df11bcf3 (patch)
tree04fed6181fe14b86aa3b84fd9f1710ad2d6a804c
parentdbcd7204366daad29b3144ddfa1e71ed5e2b2f51 (diff)
downloadorg.eclipse.ecf-eeb496aedb04468ad11cede4347343d6df11bcf3.tar.gz
org.eclipse.ecf-eeb496aedb04468ad11cede4347343d6df11bcf3.tar.xz
org.eclipse.ecf-eeb496aedb04468ad11cede4347343d6df11bcf3.zip
NEW - bug 349550: R-OSGi needs to generate URLs with full host name, not just name
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349550
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java
index 24c67bd58..db3bd9eaa 100644
--- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java
@@ -47,20 +47,20 @@ public final class R_OSGiContainerInstantiator implements IContainerInstantiator
*/
public IContainer createInstance(final ContainerTypeDescription description, final Object[] parameters) throws ContainerCreateException {
try {
- final RemoteOSGiService remoteOsGiService = Activator.getDefault().getRemoteOSGiService();
+ final RemoteOSGiService remoteOSGiService = Activator.getDefault().getRemoteOSGiService();
if (parameters == null) {
//TODO factor localHost and protocol out?
- final String localHost = InetAddress.getLocalHost().getHostName();
+ final String localHost = InetAddress.getLocalHost().getCanonicalHostName();
final String protocol = "r-osgi"; //$NON-NLS-1$
- final int port = remoteOsGiService.getListeningPort(protocol);
+ final int port = remoteOSGiService.getListeningPort(protocol);
final ID containerID = new R_OSGiID(protocol + "://" + localHost + ":" + port); //$NON-NLS-1$ //$NON-NLS-2$
- return new R_OSGiRemoteServiceContainer(remoteOsGiService, containerID);
+ return new R_OSGiRemoteServiceContainer(remoteOSGiService, containerID);
} else if (parameters.length > 0) {
if (parameters[0] instanceof ID) {
- return new R_OSGiRemoteServiceContainer(remoteOsGiService, (ID) parameters[0]);
+ return new R_OSGiRemoteServiceContainer(remoteOSGiService, (ID) parameters[0]);
} else if (parameters[0] instanceof String) {
- return new R_OSGiRemoteServiceContainer(remoteOsGiService, new R_OSGiID((String) parameters[0]));
+ return new R_OSGiRemoteServiceContainer(remoteOSGiService, new R_OSGiID((String) parameters[0]));
}
}
throw new ContainerCreateException("Unsupported arguments " //$NON-NLS-1$
@@ -124,4 +124,4 @@ public final class R_OSGiContainerInstantiator implements IContainerInstantiator
return null;
}
-} \ No newline at end of file
+}

Back to the top