Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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