Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2010-01-23 23:32:52 +0000
committerslewis2010-01-23 23:32:52 +0000
commit5c11058e66dbcd3023a12ee2736204deacde8d8b (patch)
tree462a0704ca4b46cdcd4583ab7fbc0b839a54b6cf /examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host
parent6179fb4017027b777223912fdd4aa861dd3a264b (diff)
downloadorg.eclipse.ecf-5c11058e66dbcd3023a12ee2736204deacde8d8b.tar.gz
org.eclipse.ecf-5c11058e66dbcd3023a12ee2736204deacde8d8b.tar.xz
org.eclipse.ecf-5c11058e66dbcd3023a12ee2736204deacde8d8b.zip
Added proxy container finder disablement
Diffstat (limited to 'examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host')
-rw-r--r--examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloHostApplication.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloHostApplication.java b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloHostApplication.java
index 456276a6b..cb474d78f 100644
--- a/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloHostApplication.java
+++ b/examples/bundles/org.eclipse.ecf.examples.remoteservices.hello.host/src/org/eclipse/ecf/internal/examples/remoteservices/hello/host/HelloHostApplication.java
@@ -14,7 +14,9 @@ import java.util.Properties;
import org.eclipse.ecf.examples.remoteservices.hello.IHello;
import org.eclipse.ecf.examples.remoteservices.hello.impl.Hello;
+import org.eclipse.ecf.osgi.services.distribution.DefaultProxyContainerFinder;
import org.eclipse.ecf.osgi.services.distribution.IDistributionConstants;
+import org.eclipse.ecf.osgi.services.distribution.IProxyContainerFinder;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.osgi.framework.BundleContext;
@@ -40,6 +42,8 @@ public class HelloHostApplication implements IApplication,
bundleContext = Activator.getContext();
// Process Arguments
processArgs(appContext);
+ // Disable the proxy container finder, so that a new proxy is not created locally (as this is a server)
+ disableProxyContainerFinder();
// Setup properties for remote service distribution, as per OSGi 4.2 remote services
// specification (chap 13 in compendium spec)
Properties props = new Properties();
@@ -61,6 +65,10 @@ public class HelloHostApplication implements IApplication,
return IApplication.EXIT_OK;
}
+ private void disableProxyContainerFinder() {
+ bundleContext.registerService(IProxyContainerFinder.class.getName(), new DefaultProxyContainerFinder(false), null);
+ }
+
public void stop() {
if (helloRegistration != null) {
helloRegistration.unregister();

Back to the top