Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2014-03-31 04:19:14 +0000
committerslewis2014-03-31 04:19:14 +0000
commit8156bccb78e28630dd6098df2ecb394f2cdeb407 (patch)
tree8df5fab2a0c6b166112ebf8ef65d8eeaec14470f /providers
parentb4d560fd891d1fe327910f53f7fcb9534885d9b3 (diff)
downloadorg.eclipse.ecf-8156bccb78e28630dd6098df2ecb394f2cdeb407.tar.gz
org.eclipse.ecf-8156bccb78e28630dd6098df2ecb394f2cdeb407.tar.xz
org.eclipse.ecf-8156bccb78e28630dd6098df2ecb394f2cdeb407.zip
Additions to allow org.eclipse.ecf.provider.zookeeper to be used without
extension registry bug 421569 Change-Id: I0000000000000000000000000000000000000000
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.zookeeper/META-INF/MANIFEST.MF2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.zookeeper/plugin.xml8
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.zookeeper/src/org/eclipse/ecf/provider/zookeeper/DiscoveryActivator.java14
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.zookeeper/src/org/eclipse/ecf/provider/zookeeper/core/ZooDiscoveryNamespace.java2
4 files changed, 20 insertions, 6 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.zookeeper/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.zookeeper/META-INF/MANIFEST.MF
index e73970267..8bf393314 100644
--- a/providers/bundles/org.eclipse.ecf.provider.zookeeper/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.zookeeper/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %bundle.name
Bundle-SymbolicName: org.eclipse.ecf.provider.zookeeper;singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.2.0.qualifier
Bundle-Activator: org.eclipse.ecf.provider.zookeeper.DiscoveryActivator
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/providers/bundles/org.eclipse.ecf.provider.zookeeper/plugin.xml b/providers/bundles/org.eclipse.ecf.provider.zookeeper/plugin.xml
index 2ca709379..97fa861c0 100644
--- a/providers/bundles/org.eclipse.ecf.provider.zookeeper/plugin.xml
+++ b/providers/bundles/org.eclipse.ecf.provider.zookeeper/plugin.xml
@@ -5,17 +5,17 @@
point="org.eclipse.ecf.containerFactory">
<containerFactory
class="org.eclipse.ecf.provider.zookeeper.core.ZooDiscoveryContainerInstantiator"
- description="Discovery Container"
+ description="Zookeeper Discovery Container"
name="ecf.discovery.zoodiscovery">
</containerFactory>
<containerFactory
class="org.eclipse.ecf.provider.zookeeper.core.ZooDiscoveryContainerInstantiator"
- description="Discovery Container"
+ description="Zookeeper Discovery Advertiser Container"
name="ecf.discovery.zoodiscovery.advertiser">
</containerFactory>
<containerFactory
class="org.eclipse.ecf.provider.zookeeper.core.ZooDiscoveryContainerInstantiator"
- description="Discovery Container"
+ description="Zookeeper Discovery Locator Container"
name="ecf.discovery.zoodiscovery.locator">
</containerFactory>
</extension>
@@ -23,7 +23,7 @@
point="org.eclipse.ecf.identity.namespace">
<namespace
class="org.eclipse.ecf.provider.zookeeper.core.ZooDiscoveryNamespace"
- description="ZooKeeper Based Discovery Namespace"
+ description="ZooKeeper Based Discovery Namespace"
name="ecf.namespace.zoodiscovery">
</namespace>
</extension>
diff --git a/providers/bundles/org.eclipse.ecf.provider.zookeeper/src/org/eclipse/ecf/provider/zookeeper/DiscoveryActivator.java b/providers/bundles/org.eclipse.ecf.provider.zookeeper/src/org/eclipse/ecf/provider/zookeeper/DiscoveryActivator.java
index 0bac43bda..8175053f6 100644
--- a/providers/bundles/org.eclipse.ecf.provider.zookeeper/src/org/eclipse/ecf/provider/zookeeper/DiscoveryActivator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.zookeeper/src/org/eclipse/ecf/provider/zookeeper/DiscoveryActivator.java
@@ -16,10 +16,15 @@ import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.ecf.core.ContainerTypeDescription;
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.core.util.ExtensionRegistryRunnable;
import org.eclipse.ecf.discovery.IDiscoveryAdvertiser;
import org.eclipse.ecf.discovery.IDiscoveryLocator;
import org.eclipse.ecf.provider.zookeeper.core.ZooDiscoveryContainer;
import org.eclipse.ecf.provider.zookeeper.core.ZooDiscoveryContainerInstantiator;
+import org.eclipse.ecf.provider.zookeeper.core.ZooDiscoveryNamespace;
import org.eclipse.ecf.provider.zookeeper.core.internal.BundleStoppingListener;
import org.eclipse.ecf.provider.zookeeper.util.Logger;
import org.eclipse.ecf.provider.zookeeper.util.PrettyPrinter;
@@ -42,6 +47,15 @@ public class DiscoveryActivator implements BundleActivator {
public void start(final BundleContext ctxt) {
context = ctxt;
+ SafeRunner.run(new ExtensionRegistryRunnable(ctxt) {
+ protected void runWithoutRegistry() throws Exception {
+ ctxt.registerService(Namespace.class,new ZooDiscoveryNamespace(), null);
+ ctxt.registerService(ContainerTypeDescription.class,new ContainerTypeDescription(ZooDiscoveryContainerInstantiator.NAME,new ZooDiscoveryContainerInstantiator(),"Zookeeper Discovery Container"), null);
+ ctxt.registerService(ContainerTypeDescription.class,new ContainerTypeDescription(ZooDiscoveryContainerInstantiator.NAME+".advertiser",new ZooDiscoveryContainerInstantiator(),"Zookeeper Discovery Advertiser Container"), null);
+ ctxt.registerService(ContainerTypeDescription.class,new ContainerTypeDescription(ZooDiscoveryContainerInstantiator.NAME+".locator",new ZooDiscoveryContainerInstantiator(),"Zookeeper Discovery Locator Container"), null);
+ }
+ });
+
final Properties props = new Properties();
props.put(IDiscoveryLocator.CONTAINER_NAME, ZooDiscoveryContainerInstantiator.NAME);
props.put(IDiscoveryAdvertiser.CONTAINER_NAME, ZooDiscoveryContainerInstantiator.NAME);
diff --git a/providers/bundles/org.eclipse.ecf.provider.zookeeper/src/org/eclipse/ecf/provider/zookeeper/core/ZooDiscoveryNamespace.java b/providers/bundles/org.eclipse.ecf.provider.zookeeper/src/org/eclipse/ecf/provider/zookeeper/core/ZooDiscoveryNamespace.java
index a6e5339a5..bc15ecb60 100644
--- a/providers/bundles/org.eclipse.ecf.provider.zookeeper/src/org/eclipse/ecf/provider/zookeeper/core/ZooDiscoveryNamespace.java
+++ b/providers/bundles/org.eclipse.ecf.provider.zookeeper/src/org/eclipse/ecf/provider/zookeeper/core/ZooDiscoveryNamespace.java
@@ -26,7 +26,7 @@ public class ZooDiscoveryNamespace extends Namespace {
public static final String NAME = "ecf.namespace.zoodiscovery"; //$NON-NLS-1$
public ZooDiscoveryNamespace() {
- super(NAME, "ZooKeeper Based Discovery Namespace"); //$NON-NLS-1$
+ super(NAME, "ZooKeeper Discovery Namespace"); //$NON-NLS-1$
}
public ID createInstance(Object[] parameters) throws IDCreateException {

Back to the top