diff options
author | slewis | 2007-03-06 19:24:15 +0000 |
---|---|---|
committer | slewis | 2007-03-06 19:24:15 +0000 |
commit | 39dbbf8b35af51bff842100123f1eb68b0f1ad27 (patch) | |
tree | 64847be559775293e7c05d47abf9fb12a92f00ab /framework/bundles | |
parent | ccac19fe5715ed3719cce5a88b8b728330cecb21 (diff) | |
download | org.eclipse.ecf-39dbbf8b35af51bff842100123f1eb68b0f1ad27.tar.gz org.eclipse.ecf-39dbbf8b35af51bff842100123f1eb68b0f1ad27.tar.xz org.eclipse.ecf-39dbbf8b35af51bff842100123f1eb68b0f1ad27.zip |
Added IDFactory service. The service interface is org.eclipse.ecf.identity.IIDFactory. Added test code in org.eclipse.ecf.tests.IDFactoryServiceTest
Diffstat (limited to 'framework/bundles')
-rw-r--r-- | framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java index 027fbe207..a8713bf49 100644 --- a/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java +++ b/framework/bundles/org.eclipse.ecf.identity/src/org/eclipse/ecf/internal/core/identity/Activator.java @@ -25,6 +25,7 @@ import org.eclipse.ecf.core.identity.IIDFactory; import org.eclipse.ecf.core.identity.Namespace; import org.eclipse.ecf.core.util.Trace; import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceRegistration; /** * The activator class controls the plug-in life cycle @@ -54,6 +55,8 @@ public class Activator extends Plugin { private IRegistryChangeListener registryManager = null; + private ServiceRegistration idFactoryServiceRegistration = null; + /** * The constructor */ @@ -76,6 +79,9 @@ public class Activator extends Plugin { .exiting(Activator.getDefault(), IdentityDebugOptions.METHODS_ENTERING, Activator.class, "start"); //$NON-NLS-1$ + // Register IIDFactory service + idFactoryServiceRegistration = context.registerService(IIDFactory.class + .getName(), IDFactory.getDefault(), null); } protected class IdentityRegistryManager implements IRegistryChangeListener { @@ -124,11 +130,10 @@ public class Activator extends Plugin { } // remove factory.removeNamespace(n); - org.eclipse.ecf.core.util.Trace - .trace(Activator.getDefault(), - IdentityDebugOptions.DEBUG, - "removeNamespaceExtensions.removedNamespace(" //$NON-NLS-1$ - + n + ")"); //$NON-NLS-1$ + org.eclipse.ecf.core.util.Trace.trace(Activator.getDefault(), + IdentityDebugOptions.DEBUG, + "removeNamespaceExtensions.removedNamespace(" //$NON-NLS-1$ + + n + ")"); //$NON-NLS-1$ } catch (Exception e) { org.eclipse.ecf.core.util.Trace.catching( Activator.getDefault(), @@ -253,6 +258,8 @@ public class Activator extends Plugin { registryManager); registryManager = null; plugin = null; + if (idFactoryServiceRegistration != null) + idFactoryServiceRegistration.unregister(); super.stop(context); } |