Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkuppe2008-06-12 05:48:00 -0400
committermkuppe2008-06-12 05:48:00 -0400
commitfff17ebf0b3a2082316eba9542158b9870b0e205 (patch)
treedb14c24637624411b7551a270fab9faf21410b1b
parentf1add4aa8a8500a8f3c437214f247b8961fb4c6e (diff)
downloadorg.eclipse.ecf-fff17ebf0b3a2082316eba9542158b9870b0e205.tar.gz
org.eclipse.ecf-fff17ebf0b3a2082316eba9542158b9870b0e205.tar.xz
org.eclipse.ecf-fff17ebf0b3a2082316eba9542158b9870b0e205.zip
RESOLVED - bug 236826: [Discovery] Remoteservices may use Composite discovery provider
https://bugs.eclipse.org/bugs/show_bug.cgi?id=236826
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/Generic Remote EnvironmentInfo Server.launch8
-rw-r--r--server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/Activator.java9
2 files changed, 10 insertions, 7 deletions
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/Generic Remote EnvironmentInfo Server.launch b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/Generic Remote EnvironmentInfo Server.launch
index 0021847c3..9b5a8bea0 100644
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/Generic Remote EnvironmentInfo Server.launch
+++ b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/launch/Generic Remote EnvironmentInfo Server.launch
@@ -11,13 +11,13 @@
<intAttribute key="default_start_level" value="4"/>
<booleanAttribute key="includeOptional" value="true"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.ecf.examples.remoteservices.server.remoteServicesServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-console -consolelog -application org.eclipse.ecf.examples.remoteservices.server.remoteServicesServer -debug"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dnet.slp.port=10427&#10;-Dch.ethz.iks.slp.debug=false&#10;-Dnet.slp.traceDATraffic=false&#10;-Dnet.slp.traceMsg=false&#10;-Dnet.slp.traceDrop=false&#10;-Dnet.slp.traceReg=false&#10;-Dnet.slp.failercount=3&#13;&#10;-Dnet.slp.multicastTimeouts=10,25,50,100,250,500,1000&#13;&#10;-Dnet.slp.multicastMaximumWait=2000"/>
<stringAttribute key="pde.version" value="3.3"/>
<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="target_bundles" value="org.eclipse.core.contenttype@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.jobs@default:default,org.eclipse.osgi@:,org.apache.commons.logging@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.osgi.services@default:default,org.eclipse.equinox.common@default:true,javax.servlet@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.runtime.compatibility.auth@default:default"/>
+<stringAttribute key="target_bundles" value="org.eclipse.osgi@:,org.eclipse.equinox.app@default:default,org.apache.commons.logging*1.0.4.v20080605-1930@default:default,org.eclipse.core.jobs@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.registry@default:default,org.apache.commons.logging*1.0.4.v200803061811@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,javax.servlet@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.common@default:true,org.eclipse.core.runtime.compatibility.auth@default:default"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<stringAttribute key="workspace_bundles" value="org.objectweb.asm@default:default,org.eclipse.ecf.examples.remoteservices.common@default:default,org.eclipse.ecf.provider@default:default,org.eclipse.ecf@default:default,org.eclipse.ecf.provider.jmdns@default:default,org.eclipse.ecf.remoteservice@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.examples.remoteservices.server@default:default,org.eclipse.ecf.discovery@default:default,org.eclipse.ecf.provider.remoteservice@default:default,org.eclipse.ecf.sharedobject@default:default"/>
+<stringAttribute key="workspace_bundles" value="org.eclipse.ecf.provider.jslp@default:default,org.eclipse.ecf.remoteservice@default:default,org.eclipse.ecf.provider.remoteservice@default:default,org.eclipse.ecf.provider@default:default,org.eclipse.ecf.provider.jmdns@default:default,org.eclipse.ecf.sharedobject@default:default,org.eclipse.ecf@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ecf.provider.discovery@default:default,org.eclipse.ecf.examples.remoteservices.server@default:default,org.eclipse.ecf.discovery@default:default,org.eclipse.ecf.examples.remoteservices.common@default:default,ch.ethz.iks.slp@default:default"/>
</launchConfiguration>
-
diff --git a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/Activator.java b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/Activator.java
index 1e4ccdbcc..11c9f8337 100644
--- a/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/Activator.java
+++ b/server-side/examples/bundles/org.eclipse.ecf.examples.remoteservices.server/src/org/eclipse/ecf/internal/examples/remoteservices/server/Activator.java
@@ -13,8 +13,7 @@ package org.eclipse.ecf.internal.examples.remoteservices.server;
import org.eclipse.ecf.discovery.service.IDiscoveryService;
import org.eclipse.osgi.service.environment.EnvironmentInfo;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
+import org.osgi.framework.*;
import org.osgi.util.tracker.ServiceTracker;
/**
@@ -31,6 +30,8 @@ public class Activator implements BundleActivator {
private ServiceTracker discoveryTracker;
+ private Filter filter;
+
//private DiscoverableServer discoverableServer;
/**
@@ -50,7 +51,7 @@ public class Activator implements BundleActivator {
public IDiscoveryService getDiscoveryService(int waittime) throws InterruptedException {
if (discoveryTracker == null) {
- discoveryTracker = new ServiceTracker(context, org.eclipse.ecf.discovery.service.IDiscoveryService.class.getName(), null);
+ discoveryTracker = new ServiceTracker(context, filter, null);
discoveryTracker.open();
}
return (IDiscoveryService) discoveryTracker.waitForService(waittime);
@@ -63,6 +64,8 @@ public class Activator implements BundleActivator {
public void start(BundleContext ctxt) throws Exception {
plugin = this;
this.context = ctxt;
+ filter = context.createFilter("(&(" + Constants.OBJECTCLASS + "=" + IDiscoveryService.class.getName() + ")(" + IDiscoveryService.CONTAINER_NAME + "=ecf.discovery.composite))"); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
// create and start discoverable server
//discoverableServer = new DiscoverableServer();
//String[] args = {};

Back to the top