Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2016-08-23 16:55:55 -0400
committerslewis2016-08-23 16:55:55 -0400
commit89ac3f3ad51b35bfe78e602ea273b740a821072e (patch)
tree0b6f54bc1596ce67d5084d8b37687581aa15ee63 /providers/bundles
parentfe6d21aef6910d83317b2235adcc047e98fc3c17 (diff)
downloadorg.eclipse.ecf-89ac3f3ad51b35bfe78e602ea273b740a821072e.tar.gz
org.eclipse.ecf-89ac3f3ad51b35bfe78e602ea273b740a821072e.tar.xz
org.eclipse.ecf-89ac3f3ad51b35bfe78e602ea273b740a821072e.zip
Fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=499946R-Release_HEAD-sdk_feature-276_276
Diffstat (limited to 'providers/bundles')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiRemoteServiceContainer.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiRemoteServiceContainer.java b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiRemoteServiceContainer.java
index 4ff69d358..39e818f94 100644
--- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiRemoteServiceContainer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiRemoteServiceContainer.java
@@ -71,6 +71,9 @@ class R_OSGiRemoteServiceContainer implements IOSGiRemoteServiceContainerAdapter
// Connect context to use for connect calls
private IConnectContext connectContext;
+ // New system property to allow the per-transport exposure of remote services to be defeated.
+ private boolean exposeRemoteServicesOnAllTransports = Boolean.parseBoolean(System.getProperty("org.eclipse.ecf.internal.provider.r_osgi.exposeRemoteServicesOnAllTransports", "false")); //$NON-NLS-1$ //$NON-NLS-2$
+
public R_OSGiRemoteServiceContainer(RemoteOSGiService service, final ID containerID) throws IDCreateException {
Assert.isNotNull(service);
Assert.isNotNull(containerID);
@@ -444,6 +447,14 @@ class R_OSGiRemoteServiceContainer implements IOSGiRemoteServiceContainerAdapter
final Dictionary props = properties == null ? new Hashtable() : clone(properties);
+ R_OSGiNamespace ns = (R_OSGiNamespace) containerID.getNamespace();
+ // add the hint property for R-OSGi that this service is intended to be
+ // accessed remotely.
+ Object rosgiRegistrationValue = Boolean.TRUE;
+ if (!exposeRemoteServicesOnAllTransports)
+ rosgiRegistrationValue = (ns instanceof R_OSGiWSSNamespace) ? "https" : (ns instanceof R_OSGiWSNamespace) ? "http" : "r-osgi"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+
+ props.put(RemoteOSGiService.R_OSGi_REGISTRATION, rosgiRegistrationValue);
// add the hint property for R-OSGi that this service is intended to be
// accessed remotely.
props.put(RemoteOSGiService.R_OSGi_REGISTRATION, Boolean.TRUE);

Back to the top