summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-07 13:33:31 (EDT)
committerEike Stepper2007-07-07 13:33:31 (EDT)
commit25ec9b94695d3ba071a9bbe957010fa93ab2094f (patch)
tree1390ab553cdbd84b79886735e4dec869f7269db3
parent3133e7c006c49b7c3073057270dc8068a1189f27 (diff)
downloadcdo-25ec9b94695d3ba071a9bbe957010fa93ab2094f.zip
cdo-25ec9b94695d3ba071a9bbe957010fa93ab2094f.tar.gz
cdo-25ec9b94695d3ba071a9bbe957010fa93ab2094f.tar.bz2
task 1: Develop 0.8.0
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RepositoryManager.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/OM.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/config/org.eclipse.emf.cdo.server.db.properties6
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/config/org.eclipse.emf.cdo.server.properties15
4 files changed, 54 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RepositoryManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RepositoryManager.java
index c9cdd1e..0e8b4c1 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RepositoryManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/RepositoryManager.java
@@ -12,13 +12,15 @@ package org.eclipse.emf.cdo.internal.server;
import org.eclipse.emf.cdo.server.IRepositoryManager;
+import org.eclipse.net4j.internal.util.lifecycle.Lifecycle;
+
import java.util.HashMap;
import java.util.Map;
/**
* @author Eike Stepper
*/
-public final class RepositoryManager implements IRepositoryManager
+public final class RepositoryManager extends Lifecycle implements IRepositoryManager
{
// @Singleton
public static final RepositoryManager INSTANCE = new RepositoryManager();
@@ -50,4 +52,16 @@ public final class RepositoryManager implements IRepositoryManager
{
repositories.clear();
}
+
+ @Override
+ protected void doActivate() throws Exception
+ {
+ super.doActivate();
+ }
+
+ @Override
+ protected void doDeactivate() throws Exception
+ {
+ super.doDeactivate();
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/OM.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/OM.java
index eefb2aa..faf7ecc 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/OM.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/bundle/OM.java
@@ -10,6 +10,8 @@
**************************************************************************/
package org.eclipse.emf.cdo.internal.server.bundle;
+import org.eclipse.emf.cdo.internal.server.RepositoryManager;
+
import org.eclipse.net4j.internal.util.om.OSGiActivator;
import org.eclipse.net4j.util.om.OMBundle;
import org.eclipse.net4j.util.om.OMLogger;
@@ -48,5 +50,21 @@ public final class OM
{
return BUNDLE;
}
+
+ @Override
+ protected void start() throws Exception
+ {
+ RepositoryManager.INSTANCE.activate();
+ }
+
+ @Override
+ protected void stop() throws Exception
+ {
+ Exception exception = RepositoryManager.INSTANCE.deactivate();
+ if (exception != null)
+ {
+ LOG.warn(exception);
+ }
+ }
}
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/config/org.eclipse.emf.cdo.server.db.properties b/plugins/org.eclipse.emf.cdo.ui/config/org.eclipse.emf.cdo.server.db.properties
new file mode 100644
index 0000000..cea6026
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui/config/org.eclipse.emf.cdo.server.db.properties
@@ -0,0 +1,6 @@
+store.instanceID = TEST0001
+store.dbAdapter = derby
+
+datasource.driverClass = org.apache.derby.jdbc.EmbeddedDataSource
+datasource.databaseName = C:/temp/cdodb
+datasource.createDatabase = create
diff --git a/plugins/org.eclipse.emf.cdo.ui/config/org.eclipse.emf.cdo.server.properties b/plugins/org.eclipse.emf.cdo.ui/config/org.eclipse.emf.cdo.server.properties
new file mode 100644
index 0000000..e2be2f1
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui/config/org.eclipse.emf.cdo.server.properties
@@ -0,0 +1,15 @@
+repositories = repo1, repo2
+
+repo1.store = db
+repo1.store.db.instanceID = TEST0001
+repo1.store.db.dbAdapter = derby
+repo1.store.db.derby.driverClass = org.apache.derby.jdbc.EmbeddedDataSource
+repo1.store.db.derby.databaseName = C:/temp/cdodb1
+repo1.store.db.derby.createDatabase = create
+
+repo2.store = db
+repo2.store.db.instanceID = TEST0002
+repo2.store.db.dbAdapter = derby
+repo2.store.db.derby.driverClass = org.apache.derby.jdbc.EmbeddedDataSource
+repo2.store.db.derby.databaseName = C:/temp/cdodb2
+repo2.store.db.derby.createDatabase = create