Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server')
-rw-r--r--plugins/org.eclipse.emf.cdo.server/plugin.xml13
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/CDOServerApplication.java45
2 files changed, 57 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/plugin.xml b/plugins/org.eclipse.emf.cdo.server/plugin.xml
index dbaab11bd8..df78c98e03 100644
--- a/plugins/org.eclipse.emf.cdo.server/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.server/plugin.xml
@@ -20,12 +20,14 @@
<extension-point id="storeFactories" name="CDO Store Factories" schema="schema/storeFactories.exsd"/>
<extension-point id="repositoryFactories" name="CDO Repository Factories" schema="schema/repositoryFactories.exsd"/>
- <extension point="org.eclipse.net4j.util.factories">
+ <extension
+ point="org.eclipse.net4j.util.factories">
<factory
productGroup="org.eclipse.net4j.serverProtocols"
type="cdo"
class="org.eclipse.emf.cdo.internal.server.protocol.CDOPluginProtocolFactory"/>
</extension>
+
<extension
point="org.eclipse.emf.cdo.server.repositoryFactories">
<repositoryFactory
@@ -34,4 +36,13 @@
</repositoryFactory>
</extension>
+ <extension
+ point="org.eclipse.core.runtime.applications"
+ id="app"
+ name="CDO Server">
+ <application cardinality="1" thread="any">
+ <run class="org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication"/>
+ </application>
+ </extension>
+
</plugin>
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/CDOServerApplication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/CDOServerApplication.java
new file mode 100644
index 0000000000..e801cdba51
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/CDOServerApplication.java
@@ -0,0 +1,45 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.emf.cdo.internal.server.bundle;
+
+import org.eclipse.net4j.internal.util.om.OSGiBundle;
+
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
+
+import org.osgi.framework.BundleException;
+
+/**
+ * @author Eike Stepper
+ */
+public class CDOServerApplication implements IApplication
+{
+ public CDOServerApplication()
+ {
+ }
+
+ public Object start(IApplicationContext context) throws Exception
+ {
+ return EXIT_OK;
+ }
+
+ public void stop()
+ {
+ try
+ {
+ ((OSGiBundle)OM.BUNDLE).getBundleContext().getBundle().stop();
+ }
+ catch (BundleException ex)
+ {
+ OM.LOG.error(ex);
+ }
+ }
+}

Back to the top