summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-03-09 03:03:59 (EDT)
committerEike Stepper2008-03-09 03:03:59 (EDT)
commit4abd6d4e7f771bcd36b89034f28592fafd397c2d (patch)
tree89c4c52550a589357cd5f43c660c12a92f34c8f6
parentafd868c76593a270c9caabd722fc36bdcebc57f1 (diff)
downloadcdo-4abd6d4e7f771bcd36b89034f28592fafd397c2d.zip
cdo-4abd6d4e7f771bcd36b89034f28592fafd397c2d.tar.gz
cdo-4abd6d4e7f771bcd36b89034f28592fafd397c2d.tar.bz2
[217117] Develop a HibernateStore
https://bugs.eclipse.org/bugs/show_bug.cgi?id=217117
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java4
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
index aaf9d45..7a8b9cd 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
@@ -36,6 +36,7 @@ import org.eclipse.emf.internal.cdo.protocol.OpenSessionRequest;
import org.eclipse.emf.internal.cdo.protocol.OpenSessionResult;
import org.eclipse.emf.internal.cdo.protocol.QueryObjectTypesRequest;
import org.eclipse.emf.internal.cdo.protocol.ViewsChangedRequest;
+import org.eclipse.emf.internal.cdo.util.FSMUtil;
import org.eclipse.emf.internal.cdo.util.ModelUtil;
import org.eclipse.emf.internal.cdo.util.ProxyResolverURIResourceMap;
@@ -168,6 +169,11 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession, CD
public void setDisableLegacyObjects(boolean disableLegacyObjects)
{
checkInactive();
+ if (!disableLegacyObjects && !FSMUtil.isLegacySystemAvailable())
+ {
+ throw new IllegalArgumentException(FSMUtil.LEGACY_SYSTEM_NOT_AVAILABLE);
+ }
+
this.disableLegacyObjects = disableLegacyObjects;
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java
index 52f701a..48315f3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java
@@ -37,6 +37,8 @@ import java.util.Iterator;
*/
public final class FSMUtil
{
+ public static final String LEGACY_SYSTEM_NOT_AVAILABLE = "Legacy system not available";
+
private static Method adaptLegacyMethod = initAdaptLegacyMethod();
private FSMUtil()
@@ -62,7 +64,7 @@ public final class FSMUtil
{
}
- OM.LOG.info("Legacy system not available");
+ OM.LOG.info(LEGACY_SYSTEM_NOT_AVAILABLE);
return null;
}