Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.emf.cdo.doc/src/org/eclipse/emf/cdo/doc/operators/Doc01_ConfiguringRepositories.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IDBStore.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java6
3 files changed, 23 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.doc/src/org/eclipse/emf/cdo/doc/operators/Doc01_ConfiguringRepositories.java b/plugins/org.eclipse.emf.cdo.doc/src/org/eclipse/emf/cdo/doc/operators/Doc01_ConfiguringRepositories.java
index 910cdd4975..2b45944732 100644
--- a/plugins/org.eclipse.emf.cdo.doc/src/org/eclipse/emf/cdo/doc/operators/Doc01_ConfiguringRepositories.java
+++ b/plugins/org.eclipse.emf.cdo.doc/src/org/eclipse/emf/cdo/doc/operators/Doc01_ConfiguringRepositories.java
@@ -288,6 +288,18 @@ public class Doc01_ConfiguringRepositories
public class Property_writerPoolCapacity
{
}
+
+ /**
+ * Property dropAllDataOnActivate
+ * <p>
+ * If set to <code>true</code> and the store is a DBStore, drops all database tables of the configured
+ * {@link Element_dataSource schema} at the beginning of the store activation.
+ * <p>
+ * The default value is <code>false</code>.
+ */
+ public class Property_dropAllDataOnActivate
+ {
+ }
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IDBStore.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IDBStore.java
index 5cb3bb67dc..ce5824880a 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IDBStore.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/db/IDBStore.java
@@ -133,5 +133,10 @@ public interface IDBStore extends IStore, IDBConnectionProvider, CanHandleClient
* @since 4.3
*/
public static final String FIELD_CONSTRUCTION_TRACKING = "fieldConstructionTracking"; //$NON-NLS-1$
+
+ /**
+ * @since 4.4
+ */
+ public static final String DROP_ALL_DATA_ON_ACTIVATE = "dropAllDataOnActivate"; //$NON-NLS-1$
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
index 62aad4594e..62322f5eb9 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStore.java
@@ -598,6 +598,12 @@ public class DBStore extends Store implements IDBStore, IMappingConstants, CDOAl
configureAccessorPool(readerPool, IDBStore.Props.READER_POOL_CAPACITY);
configureAccessorPool(writerPool, IDBStore.Props.WRITER_POOL_CAPACITY);
+
+ String prop = properties.get(IDBStore.Props.DROP_ALL_DATA_ON_ACTIVATE);
+ if (prop != null)
+ {
+ setDropAllDataOnActivate(Boolean.parseBoolean(prop));
+ }
}
Connection connection = getConnection();

Back to the top