Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-08-07 15:51:50 -0400
committerEike Stepper2013-08-10 05:44:23 -0400
commita33451d1572e41b67206ac58328232db60377a5e (patch)
tree6a2428f281459ab48ff6b3c4c71053c1e7997daa
parent02defe32410e41b300dac05f8835bb4307645c10 (diff)
downloadcdo-a33451d1572e41b67206ac58328232db60377a5e.tar.gz
cdo-a33451d1572e41b67206ac58328232db60377a5e.tar.xz
cdo-a33451d1572e41b67206ac58328232db60377a5e.zip
[405606] ClassCastException when using unchunked and restricted
CollectionLoadingPolicies https://bugs.eclipse.org/bugs/show_bug.cgi?id=405606 Change-Id: I81f5c551152a02285d2df69312def6089b7d069b
-rw-r--r--features/org.eclipse.emf.cdo.server.db-feature/feature.xml2
-rw-r--r--features/org.eclipse.emf.cdo.server.lissome-feature/feature.xml2
-rw-r--r--plugins/org.eclipse.emf.cdo.common/.settings/.api_filters9
-rw-r--r--plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF68
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/handler/BinaryCommitInfoLog.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDODataOutput.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/util/CDOCommonUtil.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataOutputImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/BaseCDORevision.java106
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/CDORevisionUnchunker.java20
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientRequest.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientRequestWithMonitoring.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF16
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF14
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileHandle.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerIndication.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerIndicationWithMonitoring.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerRequest.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/DelegatingRepository.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java72
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/View.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ChunkingTest.java19
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_405606_Test.java93
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java44
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/META-INF/MANIFEST.MF10
-rw-r--r--plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/AbstractCDOWorkspaceBase.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java4
36 files changed, 486 insertions, 130 deletions
diff --git a/features/org.eclipse.emf.cdo.server.db-feature/feature.xml b/features/org.eclipse.emf.cdo.server.db-feature/feature.xml
index 579fb25076..eec29bd943 100644
--- a/features/org.eclipse.emf.cdo.server.db-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.server.db-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.emf.cdo.server.db"
label="%featureName"
- version="4.2.0.qualifier"
+ version="4.2.100.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.cdo.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.emf.cdo.server.lissome-feature/feature.xml b/features/org.eclipse.emf.cdo.server.lissome-feature/feature.xml
index acab3f002b..4a922413f3 100644
--- a/features/org.eclipse.emf.cdo.server.lissome-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.server.lissome-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.emf.cdo.server.lissome"
label="%featureName"
- version="4.2.0.qualifier"
+ version="4.2.100.qualifier"
provider-name="%providerName"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.emf.cdo.license"
diff --git a/plugins/org.eclipse.emf.cdo.common/.settings/.api_filters b/plugins/org.eclipse.emf.cdo.common/.settings/.api_filters
index a83b062f11..6f5fed218e 100644
--- a/plugins/org.eclipse.emf.cdo.common/.settings/.api_filters
+++ b/plugins/org.eclipse.emf.cdo.common/.settings/.api_filters
@@ -140,6 +140,15 @@
</message_arguments>
</filter>
</resource>
+ <resource path="src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java" type="org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants">
+ <filter id="388194388">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants"/>
+ <message_argument value="PROTOCOL_VERSION"/>
+ <message_argument value="13"/>
+ </message_arguments>
+ </filter>
+ </resource>
<resource path="src/org/eclipse/emf/cdo/spi/common/id/AbstractCDOID.java" type="org.eclipse.emf.cdo.spi.common.id.AbstractCDOID">
<filter id="337682486">
<message_arguments>
diff --git a/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF
index 614d88a072..944c02b250 100644
--- a/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.common/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.common
-Bundle-Version: 4.2.100.qualifier
+Bundle-Version: 4.3.0.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -14,21 +14,21 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)";visibili
org.eclipse.emf.ecore.change;bundle-version="[2.5.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.ecore.xmi;bundle-version="[2.5.0,3.0.0)";visibility:=reexport,
org.eclipse.net4j.util;bundle-version="[3.0.0,4.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.common;version="4.2.100",
- org.eclipse.emf.cdo.common.admin;version="4.2.100",
- org.eclipse.emf.cdo.common.branch;version="4.2.100",
- org.eclipse.emf.cdo.common.commit;version="4.2.100",
- org.eclipse.emf.cdo.common.commit.handler;version="4.2.100",
- org.eclipse.emf.cdo.common.id;version="4.2.100",
- org.eclipse.emf.cdo.common.lob;version="4.2.100",
- org.eclipse.emf.cdo.common.lock;version="4.2.100",
- org.eclipse.emf.cdo.common.model;version="4.2.100",
- org.eclipse.emf.cdo.common.protocol;version="4.2.100",
- org.eclipse.emf.cdo.common.revision;version="4.2.100",
- org.eclipse.emf.cdo.common.revision.delta;version="4.2.100",
- org.eclipse.emf.cdo.common.security;version="4.2.100",
- org.eclipse.emf.cdo.common.util;version="4.2.100",
- org.eclipse.emf.cdo.internal.common;version="4.2.100";
+Export-Package: org.eclipse.emf.cdo.common;version="4.3.0",
+ org.eclipse.emf.cdo.common.admin;version="4.3.0",
+ org.eclipse.emf.cdo.common.branch;version="4.3.0",
+ org.eclipse.emf.cdo.common.commit;version="4.3.0",
+ org.eclipse.emf.cdo.common.commit.handler;version="4.3.0",
+ org.eclipse.emf.cdo.common.id;version="4.3.0",
+ org.eclipse.emf.cdo.common.lob;version="4.3.0",
+ org.eclipse.emf.cdo.common.lock;version="4.3.0",
+ org.eclipse.emf.cdo.common.model;version="4.3.0",
+ org.eclipse.emf.cdo.common.protocol;version="4.3.0",
+ org.eclipse.emf.cdo.common.revision;version="4.3.0",
+ org.eclipse.emf.cdo.common.revision.delta;version="4.3.0",
+ org.eclipse.emf.cdo.common.security;version="4.3.0",
+ org.eclipse.emf.cdo.common.util;version="4.3.0",
+ org.eclipse.emf.cdo.internal.common;version="4.3.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -38,11 +38,11 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.2.100",
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.server.hibernate",
- org.eclipse.emf.cdo.internal.common.branch;version="4.2.100";
+ org.eclipse.emf.cdo.internal.common.branch;version="4.3.0";
x-friends:="org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.server.hibernate",
- org.eclipse.emf.cdo.internal.common.bundle;version="4.2.100";x-internal:=true,
- org.eclipse.emf.cdo.internal.common.commit;version="4.2.100";
+ org.eclipse.emf.cdo.internal.common.bundle;version="4.3.0";x-internal:=true,
+ org.eclipse.emf.cdo.internal.common.commit;version="4.3.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -51,7 +51,7 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.2.100",
org.eclipse.emf.cdo.server.net4j,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.internal.common.id;version="4.2.100";
+ org.eclipse.emf.cdo.internal.common.id;version="4.3.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -62,9 +62,9 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.2.100",
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.admin,
org.eclipse.emf.cdo.server.admin",
- org.eclipse.emf.cdo.internal.common.lock;version="4.2.100";x-internal:=true,
- org.eclipse.emf.cdo.internal.common.messages;version="4.2.100";x-internal:=true,
- org.eclipse.emf.cdo.internal.common.model;version="4.2.100";
+ org.eclipse.emf.cdo.internal.common.lock;version="4.3.0";x-internal:=true,
+ org.eclipse.emf.cdo.internal.common.messages;version="4.3.0";x-internal:=true,
+ org.eclipse.emf.cdo.internal.common.model;version="4.3.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -73,7 +73,7 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.2.100",
org.eclipse.emf.cdo.server.net4j,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.internal.common.revision;version="4.2.100";
+ org.eclipse.emf.cdo.internal.common.revision;version="4.3.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -82,7 +82,7 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.2.100",
org.eclipse.emf.cdo.server.net4j,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.internal.common.revision.delta;version="4.2.100";
+ org.eclipse.emf.cdo.internal.common.revision.delta;version="4.3.0";
x-friends:="org.eclipse.emf.cdo.common,
org.eclipse.emf.cdo.common.db,
org.eclipse.emf.cdo,
@@ -91,12 +91,12 @@ Export-Package: org.eclipse.emf.cdo.common;version="4.2.100",
org.eclipse.emf.cdo.server.net4j,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.spi.common;version="4.2.100",
- org.eclipse.emf.cdo.spi.common.admin;version="4.2.100",
- org.eclipse.emf.cdo.spi.common.branch;version="4.2.100",
- org.eclipse.emf.cdo.spi.common.commit;version="4.2.100",
- org.eclipse.emf.cdo.spi.common.id;version="4.2.100",
- org.eclipse.emf.cdo.spi.common.lock;version="4.2.100",
- org.eclipse.emf.cdo.spi.common.model;version="4.2.100",
- org.eclipse.emf.cdo.spi.common.protocol;version="4.2.100",
- org.eclipse.emf.cdo.spi.common.revision;version="4.2.100"
+ org.eclipse.emf.cdo.spi.common;version="4.3.0",
+ org.eclipse.emf.cdo.spi.common.admin;version="4.3.0",
+ org.eclipse.emf.cdo.spi.common.branch;version="4.3.0",
+ org.eclipse.emf.cdo.spi.common.commit;version="4.3.0",
+ org.eclipse.emf.cdo.spi.common.id;version="4.3.0",
+ org.eclipse.emf.cdo.spi.common.lock;version="4.3.0",
+ org.eclipse.emf.cdo.spi.common.model;version="4.3.0",
+ org.eclipse.emf.cdo.spi.common.protocol;version="4.3.0",
+ org.eclipse.emf.cdo.spi.common.revision;version="4.3.0"
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/handler/BinaryCommitInfoLog.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/handler/BinaryCommitInfoLog.java
index 4afc31ba66..f4977fac07 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/handler/BinaryCommitInfoLog.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/commit/handler/BinaryCommitInfoLog.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.common.model.CDOPackageRegistry;
import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
import org.eclipse.emf.cdo.common.util.CDOCommonUtil;
import org.eclipse.emf.cdo.internal.common.bundle.OM;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.net4j.util.io.ExtendedDataOutput;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
@@ -34,10 +35,18 @@ public class BinaryCommitInfoLog implements CDOCommitInfoHandler
{
private CDODataOutput out;
- public BinaryCommitInfoLog(OutputStream stream, CDOPackageRegistry packageRegistry)
+ /**
+ * @since 4.3
+ */
+ public BinaryCommitInfoLog(OutputStream stream, CDOPackageRegistry packageRegistry, CDORevisionUnchunker unchunker)
{
ExtendedDataOutput eod = ExtendedDataOutputStream.wrap(stream);
- out = CDOCommonUtil.createCDODataOutput(eod, packageRegistry, CDOIDProvider.NOOP);
+ out = CDOCommonUtil.createCDODataOutput(eod, packageRegistry, CDOIDProvider.NOOP, unchunker);
+ }
+
+ public BinaryCommitInfoLog(OutputStream stream, CDOPackageRegistry packageRegistry)
+ {
+ this(stream, packageRegistry, null);
}
public void handleCommitInfo(CDOCommitInfo commitInfo)
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDODataOutput.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDODataOutput.java
index 134d83ee9a..725a61f08e 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDODataOutput.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDODataOutput.java
@@ -38,6 +38,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevisionKey;
import org.eclipse.emf.cdo.common.revision.delta.CDOFeatureDelta;
import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
import org.eclipse.emf.cdo.common.security.CDOPermissionProvider;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
import org.eclipse.net4j.util.io.ExtendedDataOutput;
@@ -67,6 +68,11 @@ public interface CDODataOutput extends ExtendedDataOutput
*/
public CDOPermissionProvider getPermissionProvider();
+ /**
+ * @since 4.3
+ */
+ public CDORevisionUnchunker getRevisionUnchunker();
+
// /////////////////////////////////////////////////////////////////////////////////////////////////
public void writeCDOPackageUnit(CDOPackageUnit packageUnit, boolean withPackages) throws IOException;
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java
index ee296f172e..e2976c35a0 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/protocol/CDOProtocolConstants.java
@@ -28,7 +28,7 @@ public interface CDOProtocolConstants
/**
* @since 4.2
*/
- public static final int PROTOCOL_VERSION = 13;
+ public static final int PROTOCOL_VERSION = 14;
// //////////////////////////////////////////////////////////////////////
// Signal IDs
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/util/CDOCommonUtil.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/util/CDOCommonUtil.java
index 09e73e603f..d560d84f82 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/util/CDOCommonUtil.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/util/CDOCommonUtil.java
@@ -25,6 +25,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevision;
import org.eclipse.emf.cdo.common.revision.CDORevisionFactory;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataOutputImpl;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.net4j.util.event.IEvent;
import org.eclipse.net4j.util.event.IListener;
@@ -110,10 +111,21 @@ public final class CDOCommonUtil
/**
* @since 4.0
+ * @deprecated As of 4.3 use {@link #createCDODataOutput(ExtendedDataOutput, CDOPackageRegistry, CDOIDProvider, CDORevisionUnchunker)}.
*/
+ @Deprecated
public static CDODataOutput createCDODataOutput(ExtendedDataOutput extendedDataOutputStream,
final CDOPackageRegistry packageRegistry, final CDOIDProvider idProvider)
{
+ return createCDODataOutput(extendedDataOutputStream, packageRegistry, idProvider, null);
+ }
+
+ /**
+ * @since 4.3
+ */
+ public static CDODataOutput createCDODataOutput(ExtendedDataOutput extendedDataOutputStream,
+ final CDOPackageRegistry packageRegistry, final CDOIDProvider idProvider, final CDORevisionUnchunker unchunker)
+ {
return new CDODataOutputImpl(extendedDataOutputStream)
{
@Override
@@ -127,6 +139,12 @@ public final class CDOCommonUtil
{
return idProvider;
}
+
+ @Override
+ public CDORevisionUnchunker getRevisionUnchunker()
+ {
+ return unchunker;
+ }
};
}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataOutputImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataOutputImpl.java
index 73cd79c095..2902a6d46e 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataOutputImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataOutputImpl.java
@@ -49,6 +49,7 @@ import org.eclipse.emf.cdo.internal.common.revision.delta.CDOFeatureDeltaImpl;
import org.eclipse.emf.cdo.internal.common.revision.delta.CDORevisionDeltaImpl;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageInfo;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
@@ -564,6 +565,14 @@ public class CDODataOutputImpl extends ExtendedDataOutput.Delegating implements
return CDORevision.PERMISSION_PROVIDER;
}
+ /**
+ * @since 4.3
+ */
+ public CDORevisionUnchunker getRevisionUnchunker()
+ {
+ return null;
+ }
+
protected StringIO getPackageURICompressor()
{
return StringIO.DIRECT;
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/BaseCDORevision.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/BaseCDORevision.java
index 1343941de4..e24c87c551 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/BaseCDORevision.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/BaseCDORevision.java
@@ -23,6 +23,7 @@ import org.eclipse.emf.cdo.common.model.CDOModelUtil;
import org.eclipse.emf.cdo.common.model.CDOType;
import org.eclipse.emf.cdo.common.protocol.CDODataInput;
import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
+import org.eclipse.emf.cdo.common.revision.CDOElementProxy;
import org.eclipse.emf.cdo.common.revision.CDOList;
import org.eclipse.emf.cdo.common.revision.CDOListFactory;
import org.eclipse.emf.cdo.common.revision.CDORevision;
@@ -89,8 +90,6 @@ public abstract class BaseCDORevision extends AbstractCDORevision
private static final byte PERMISSION_MASK = 0x03;
- private static final byte TRANSFER_MASK = PERMISSION_MASK | UNCHUNKED_FLAG;
-
private CDOID id;
private CDOBranchPoint branchPoint;
@@ -139,7 +138,7 @@ public abstract class BaseCDORevision extends AbstractCDORevision
resourceID = source.resourceID;
containerID = source.containerID;
containingFeatureID = source.containingFeatureID;
- flags = (byte)(source.flags & TRANSFER_MASK);
+ flags = (byte)(source.flags & ~FROZEN_FLAG);
}
/**
@@ -154,10 +153,15 @@ public abstract class BaseCDORevision extends AbstractCDORevision
readSystemValues(in);
- byte flagBits = (byte)(in.readByte() & TRANSFER_MASK);
+ byte flagBits = in.readByte(); // Don't set permissions into this.falgs before readValues()
+ flagBits |= UNCHUNKED_FLAG; // First assume all lists are unchunked; may be revised below
+
if ((flagBits & PERMISSION_MASK) != CDOPermission.NONE.ordinal())
{
- readValues(in);
+ if (!readValues(in))
+ {
+ flagBits &= ~UNCHUNKED_FLAG;
+ }
}
flags = flagBits;
@@ -219,23 +223,19 @@ public abstract class BaseCDORevision extends AbstractCDORevision
CDOPermissionProvider permissionProvider = out.getPermissionProvider();
CDOPermission permission = permissionProvider.getPermission(this, securityContext);
-
- int bits = flags & TRANSFER_MASK & ~PERMISSION_MASK;
- bits |= permission.getBits();
-
- if (referenceChunk == CDORevision.UNCHUNKED)
- {
- bits |= UNCHUNKED_FLAG;
- }
- else
- {
- bits &= ~UNCHUNKED_FLAG;
- }
-
- out.writeByte(bits);
+ out.writeByte(permission.getBits());
if (permission != CDOPermission.NONE)
{
+ if (!isUnchunked() && referenceChunk != 0)
+ {
+ CDORevisionUnchunker unchunker = out.getRevisionUnchunker();
+ if (unchunker != null)
+ {
+ unchunker.ensureChunks(this, referenceChunk);
+ }
+ }
+
writeValues(out, referenceChunk);
}
@@ -920,11 +920,13 @@ public abstract class BaseCDORevision extends AbstractCDORevision
}
}
- private void readValues(CDODataInput in) throws IOException
+ private boolean readValues(CDODataInput in) throws IOException
{
EClass owner = getEClass();
EStructuralFeature[] features = getAllPersistentFeatures();
initValues(features);
+
+ boolean unchunked = true;
for (int i = 0; i < features.length; i++)
{
Object value;
@@ -942,7 +944,21 @@ public abstract class BaseCDORevision extends AbstractCDORevision
if (feature.isMany())
{
- value = in.readCDOList(owner, feature);
+ CDOList list = in.readCDOList(owner, feature);
+ if (unchunked)
+ {
+ int size = list.size();
+ if (size != 0)
+ {
+ Object lastElement = list.get(size - 1);
+ if (lastElement == InternalCDOList.UNINITIALIZED || lastElement instanceof CDOElementProxy)
+ {
+ unchunked = false;
+ }
+ }
+ }
+
+ value = list;
}
else
{
@@ -955,6 +971,8 @@ public abstract class BaseCDORevision extends AbstractCDORevision
setValue(i, value);
}
+
+ return unchunked;
}
public static void checkNoFeatureMap(EStructuralFeature feature)
@@ -992,4 +1010,50 @@ public abstract class BaseCDORevision extends AbstractCDORevision
return value;
}
+
+ /**
+ * @since 4.3
+ */
+ public static String formatFlags(BaseCDORevision revision)
+ {
+ int flags = revision.flags;
+
+ StringBuilder builder = new StringBuilder();
+ if ((flags & UNCHUNKED_FLAG) != 0)
+ {
+ builder.append("UNCHUNKED");
+ }
+
+ if ((flags & FROZEN_FLAG) != 0)
+ {
+ if (builder.length() != 0)
+ {
+ builder.append("|");
+ }
+
+ builder.append("FROZEN");
+ }
+
+ if ((flags & CDOPermission.READ.getBits()) != 0)
+ {
+ if (builder.length() != 0)
+ {
+ builder.append("|");
+ }
+
+ builder.append("READ");
+ }
+
+ if ((flags & CDOPermission.WRITE.getBits()) != 0)
+ {
+ if (builder.length() != 0)
+ {
+ builder.append("|");
+ }
+
+ builder.append("WRITE");
+ }
+
+ return builder.toString();
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/CDORevisionUnchunker.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/CDORevisionUnchunker.java
new file mode 100644
index 0000000000..19fbd3592f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/CDORevisionUnchunker.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2004-2013 Eike Stepper (Berlin, Germany) and others.
+ * 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.spi.common.revision;
+
+/**
+ * @author Eike Stepper
+ * @since 4.3
+ */
+public interface CDORevisionUnchunker
+{
+ public void ensureChunks(InternalCDORevision revision, int chunkSize);
+}
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientRequest.java
index 223fcebdd0..efd048894b 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientRequest.java
@@ -23,6 +23,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevisionFactory;
import org.eclipse.emf.cdo.internal.common.revision.CDOListWithElementProxiesImpl;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataOutputImpl;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.net4j.signal.RequestWithConfirmation;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
@@ -71,6 +72,12 @@ public abstract class CDOClientRequest<RESULT> extends RequestWithConfirmation<R
}
@Override
+ public CDORevisionUnchunker getRevisionUnchunker()
+ {
+ return getSession();
+ }
+
+ @Override
public CDOIDProvider getIDProvider()
{
return CDOClientRequest.this.getIDProvider();
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientRequestWithMonitoring.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientRequestWithMonitoring.java
index 584d14a3c5..e140683c95 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientRequestWithMonitoring.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CDOClientRequestWithMonitoring.java
@@ -26,6 +26,7 @@ import org.eclipse.emf.cdo.common.revision.CDORevisionFactory;
import org.eclipse.emf.cdo.internal.common.revision.CDOListWithElementProxiesImpl;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataOutputImpl;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.net4j.signal.RequestWithMonitoring;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
@@ -103,6 +104,12 @@ public abstract class CDOClientRequestWithMonitoring<RESULT> extends RequestWith
}
@Override
+ public CDORevisionUnchunker getRevisionUnchunker()
+ {
+ return getSession();
+ }
+
+ @Override
protected StringIO getPackageURICompressor()
{
return getProtocol().getPackageURICompressor();
diff --git a/plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF
index ba0b3c3be8..935a0b0cc0 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.db/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.server.db;singleton:=true
-Bundle-Version: 4.2.0.qualifier
+Bundle-Version: 4.2.100.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -12,10 +12,10 @@ Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.net4j.db;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.server;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.server.db;version="4.2.0",
- org.eclipse.emf.cdo.server.db.mapping;version="4.2.0",
- org.eclipse.emf.cdo.server.internal.db;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db",
- org.eclipse.emf.cdo.server.internal.db.bundle;version="4.2.0";x-internal:=true,
- org.eclipse.emf.cdo.server.internal.db.mapping;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db",
- org.eclipse.emf.cdo.server.internal.db.mapping.horizontal;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db",
- org.eclipse.emf.cdo.server.internal.db.messages;version="4.2.0";x-internal:=true
+Export-Package: org.eclipse.emf.cdo.server.db;version="4.2.100",
+ org.eclipse.emf.cdo.server.db.mapping;version="4.2.100",
+ org.eclipse.emf.cdo.server.internal.db;version="4.2.100";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db",
+ org.eclipse.emf.cdo.server.internal.db.bundle;version="4.2.100";x-internal:=true,
+ org.eclipse.emf.cdo.server.internal.db.mapping;version="4.2.100";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db",
+ org.eclipse.emf.cdo.server.internal.db.mapping.horizontal;version="4.2.100";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db",
+ org.eclipse.emf.cdo.server.internal.db.messages;version="4.2.100";x-internal:=true
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java
index 13da4b20ad..5e90529832 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalBranchingClassMapping.java
@@ -1042,7 +1042,7 @@ public class HorizontalBranchingClassMapping extends AbstractHorizontalClassMapp
}
// Make sure all chunks are loaded
- repository.ensureChunks(oldRevision);
+ repository.ensureChunks(oldRevision, CDORevision.UNCHUNKED);
InternalCDORevision newRevision = oldRevision.copy();
newRevision.adjustForCommit(accessor.getTransaction().getBranch(), created);
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF
index 3a2642f061..0d0c43886c 100644
--- a/plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.server.lissome;singleton:=true
-Bundle-Version: 4.2.0.qualifier
+Bundle-Version: 4.2.100.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -14,9 +14,9 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.net4j.db.h2;bundle-version="[4.0.0,5.0.0)"
Import-Package: org.h2;version="[1.0.0,2.0.0)",
org.h2.jdbcx;version="[1.0.0,2.0.0)"
-Export-Package: org.eclipse.emf.cdo.server.internal.lissome;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests.lissome",
- org.eclipse.emf.cdo.server.internal.lissome.bundle;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests.lissome",
- org.eclipse.emf.cdo.server.internal.lissome.db;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests.lissome",
- org.eclipse.emf.cdo.server.internal.lissome.file;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests.lissome",
- org.eclipse.emf.cdo.server.internal.lissome.optimizer;version="4.2.0";x-friends:="org.eclipse.emf.cdo.tests.lissome",
- org.eclipse.emf.cdo.server.lissome;version="4.2.0"
+Export-Package: org.eclipse.emf.cdo.server.internal.lissome;version="4.2.100";x-friends:="org.eclipse.emf.cdo.tests.lissome",
+ org.eclipse.emf.cdo.server.internal.lissome.bundle;version="4.2.100";x-friends:="org.eclipse.emf.cdo.tests.lissome",
+ org.eclipse.emf.cdo.server.internal.lissome.db;version="4.2.100";x-friends:="org.eclipse.emf.cdo.tests.lissome",
+ org.eclipse.emf.cdo.server.internal.lissome.file;version="4.2.100";x-friends:="org.eclipse.emf.cdo.tests.lissome",
+ org.eclipse.emf.cdo.server.internal.lissome.optimizer;version="4.2.100";x-friends:="org.eclipse.emf.cdo.tests.lissome",
+ org.eclipse.emf.cdo.server.lissome;version="4.2.100"
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileHandle.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileHandle.java
index b07f0f66ff..2d3b11bf51 100644
--- a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileHandle.java
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeFileHandle.java
@@ -47,6 +47,7 @@ import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta;
import org.eclipse.emf.cdo.common.security.CDOPermissionProvider;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataOutputImpl;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.emf.cdo.spi.common.revision.DetachedCDORevision;
import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
@@ -109,6 +110,11 @@ public class LissomeFileHandle extends DataInputOutputFile implements CDODataInp
return getStore().getRepository().getCommitInfoManager();
}
+ public CDORevisionUnchunker getRevisionUnchunker()
+ {
+ return null;
+ }
+
public CDORevisionFactory getRevisionFactory()
{
return CDORevisionFactory.DEFAULT;
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF
index 82e167aca1..83f6f2da10 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.server.net4j;singleton:=true
-Bundle-Version: 4.1.0.qualifier
+Bundle-Version: 4.1.100.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -12,6 +12,6 @@ Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
org.eclipse.emf.cdo.server;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
org.eclipse.net4j;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.server.internal.net4j.bundle;version="4.1.0";x-internal:=true,
- org.eclipse.emf.cdo.server.internal.net4j.protocol;version="4.1.0";x-friends:="org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.server.net4j;version="4.1.0"
+Export-Package: org.eclipse.emf.cdo.server.internal.net4j.bundle;version="4.1.100";x-internal:=true,
+ org.eclipse.emf.cdo.server.internal.net4j.protocol;version="4.1.100";x-friends:="org.eclipse.emf.cdo.tests",
+ org.eclipse.emf.cdo.server.net4j;version="4.1.100"
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerIndication.java
index f8c87600e7..1ac10430ea 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerIndication.java
@@ -25,6 +25,7 @@ import org.eclipse.emf.cdo.internal.common.revision.CDOListImpl;
import org.eclipse.emf.cdo.server.IStore;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataOutputImpl;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.spi.server.InternalSession;
@@ -139,6 +140,12 @@ public abstract class CDOServerIndication extends IndicationWithResponse
}
@Override
+ public CDORevisionUnchunker getRevisionUnchunker()
+ {
+ return getRepository();
+ }
+
+ @Override
public CDOIDProvider getIDProvider()
{
return getSession();
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerIndicationWithMonitoring.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerIndicationWithMonitoring.java
index 2703c8968e..bcc4df1982 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerIndicationWithMonitoring.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerIndicationWithMonitoring.java
@@ -27,6 +27,7 @@ import org.eclipse.emf.cdo.server.IStore;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataOutputImpl;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.spi.server.InternalSession;
@@ -175,6 +176,12 @@ public abstract class CDOServerIndicationWithMonitoring extends IndicationWithMo
}
@Override
+ public CDORevisionUnchunker getRevisionUnchunker()
+ {
+ return CDOServerIndicationWithMonitoring.this.getRepository();
+ }
+
+ @Override
public CDOIDProvider getIDProvider()
{
return CDOServerIndicationWithMonitoring.this.getSession();
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerRequest.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerRequest.java
index 3f41f947cc..f856d352b0 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerRequest.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CDOServerRequest.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.common.id.CDOIDProvider;
import org.eclipse.emf.cdo.common.model.CDOPackageRegistry;
import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataOutputImpl;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.emf.cdo.spi.server.InternalSession;
import org.eclipse.net4j.signal.Request;
@@ -55,6 +56,12 @@ public abstract class CDOServerRequest extends Request
}
@Override
+ public CDORevisionUnchunker getRevisionUnchunker()
+ {
+ return getSession().getManager().getRepository();
+ }
+
+ @Override
protected StringIO getPackageURICompressor()
{
return getProtocol().getPackageURICompressor();
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/DelegatingRepository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/DelegatingRepository.java
index 8f10d1ce0a..3fe2aa9f5c 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/DelegatingRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/DelegatingRepository.java
@@ -471,9 +471,9 @@ public abstract class DelegatingRepository implements InternalRepository
getDelegate().setLastCommitTimeStamp(commitTimeStamp);
}
- public void ensureChunks(InternalCDORevision revision)
+ public void ensureChunk(InternalCDORevision revision, int chunkSize)
{
- getDelegate().ensureChunks(revision);
+ getDelegate().ensureChunks(revision, chunkSize);
}
public void replicate(CDOReplicationContext context)
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
index 9c671fc2a8..07b05504a6 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
@@ -597,16 +597,48 @@ public class Repository extends Container<Object> implements InternalRepository
public void ensureChunks(InternalCDORevision revision)
{
- if (!revision.isUnchunked())
+ ensureChunks(revision, CDORevision.UNCHUNKED);
+ }
+
+ public void ensureChunks(InternalCDORevision revision, int chunkSize)
+ {
+ if (revision.isUnchunked())
{
- for (EStructuralFeature feature : revision.getClassInfo().getAllPersistentFeatures())
+ return;
+ }
+
+ IStoreAccessor accessor = null;
+ boolean unchunked = true;
+ for (EStructuralFeature feature : revision.getClassInfo().getAllPersistentFeatures())
+ {
+ if (feature.isMany())
{
- if (feature.isMany())
+ MoveableList<Object> list = revision.getList(feature);
+ int size = list.size();
+ if (chunkSize == CDORevision.UNCHUNKED)
{
- ensureChunk(revision, feature, 0, revision.getList(feature).size());
+ chunkSize = size;
+ }
+
+ int chunkEnd = Math.min(chunkSize, size);
+ accessor = ensureChunk(revision, feature, accessor, list, 0, chunkEnd);
+
+ if (unchunked)
+ {
+ for (int i = chunkEnd + 1; i < size; i++)
+ {
+ if (list.get(i) == InternalCDOList.UNINITIALIZED)
+ {
+ unchunked = false;
+ break;
+ }
+ }
}
}
+ }
+ if (unchunked)
+ {
revision.setUnchunked();
}
}
@@ -618,12 +650,42 @@ public class Repository extends Container<Object> implements InternalRepository
{
MoveableList<Object> list = revision.getList(feature);
chunkEnd = Math.min(chunkEnd, list.size());
- return ensureChunk(revision, feature, StoreThreadLocal.getAccessor(), list, chunkStart, chunkEnd);
+ IStoreAccessor accessor = StoreThreadLocal.getAccessor();
+ ensureChunk(revision, feature, accessor, list, chunkStart, chunkEnd);
+
+ // TODO Expensive: if the revision is unchunked all lists/elements must be visited
+ if (isUnchunked(revision))
+ {
+ revision.setUnchunked();
+ }
+
+ return accessor;
}
return null;
}
+ private boolean isUnchunked(InternalCDORevision revision)
+ {
+ for (EStructuralFeature feature : revision.getClassInfo().getAllPersistentFeatures())
+ {
+ if (feature.isMany())
+ {
+ MoveableList<Object> list = revision.getList(feature);
+ int size = list.size();
+ for (int i = 0; i < size; i++)
+ {
+ if (list.get(i) == InternalCDOList.UNINITIALIZED)
+ {
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+ }
+
protected IStoreAccessor ensureChunk(InternalCDORevision revision, EStructuralFeature feature,
IStoreAccessor accessor, MoveableList<Object> list, int chunkStart, int chunkEnd)
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
index d3e1b3ff89..843481cb06 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
@@ -905,6 +905,11 @@ public class ServerCDOView extends AbstractCDOView implements org.eclipse.emf.cd
throw new UnsupportedOperationException();
}
+ public void ensureChunks(InternalCDORevision revision, int chunkSize)
+ {
+ throw new UnsupportedOperationException();
+ }
+
public void processRefreshSessionResult(RefreshSessionResult result, CDOBranch branch,
List<InternalCDOView> branchViews, Map<CDOBranch, Map<CDOID, InternalCDORevision>> viewedRevisions)
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java
index c7ac0db18c..efac9096a8 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContext.java
@@ -1098,7 +1098,7 @@ public class TransactionCommitContext implements InternalCommitContext
}
// Make sure all chunks are loaded
- repository.ensureChunks(oldRevision);
+ repository.ensureChunks(oldRevision, CDORevision.UNCHUNKED);
InternalCDORevision newRevision = oldRevision.copy();
newRevision.adjustForCommit(branch, timeStamp);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/View.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/View.java
index 2798fe707c..8d25ded65b 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/View.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/View.java
@@ -145,8 +145,8 @@ public class View extends Lifecycle implements InternalView, CDOCommonView.Optio
else if (newRevision != oldRevision)
{
// Fix for Bug 369646: ensure that revisions are fully loaded
- repository.ensureChunks((InternalCDORevision)newRevision);
- repository.ensureChunks((InternalCDORevision)oldRevision);
+ repository.ensureChunks((InternalCDORevision)newRevision, CDORevision.UNCHUNKED);
+ repository.ensureChunks((InternalCDORevision)oldRevision, CDORevision.UNCHUNKED);
CDORevisionDelta delta = newRevision.compare(oldRevision);
allChangedObjects.add(delta);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java
index 6e76b1f60c..0634c6d387 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerExporter.java
@@ -506,7 +506,7 @@ public abstract class CDOServerExporter<OUT>
out.push();
InternalRepository repository = (InternalRepository)getRepository();
- repository.ensureChunks(rev);
+ repository.ensureChunks(rev, CDORevision.UNCHUNKED);
CDOClassInfo classInfo = rev.getClassInfo();
for (EStructuralFeature feature : classInfo.getAllPersistentFeatures())
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java
index 02a95206f3..2cb71a3f82 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalRepository.java
@@ -34,6 +34,7 @@ import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager.Commit
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry.PackageLoader;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry.PackageProcessor;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManager;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManager.RevisionLoader;
@@ -62,7 +63,7 @@ import java.util.concurrent.Semaphore;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface InternalRepository extends IRepository, PackageProcessor, PackageLoader, BranchLoader, RevisionLoader,
- CommitInfoLoader
+ CommitInfoLoader, CDORevisionUnchunker
{
public void setName(String name);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ChunkingTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ChunkingTest.java
index 8f3e20cc9c..e5c7aedb7b 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ChunkingTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ChunkingTest.java
@@ -35,6 +35,8 @@ import java.util.List;
*/
public class ChunkingTest extends AbstractCDOTest
{
+ private static final String RESOURCE_PATH = "/test";
+
public void testReadNative() throws Exception
{
{
@@ -137,8 +139,6 @@ public class ChunkingTest extends AbstractCDOTest
clearCache(getRepository().getRevisionManager());
- // ************************************************************* //
-
CDOSession session = openSession();
CDOTransaction transaction = session.openTransaction();
transaction.options().setRevisionPrefetchingPolicy(CDOUtil.createRevisionPrefetchingPolicy(10));
@@ -174,7 +174,6 @@ public class ChunkingTest extends AbstractCDOTest
}
clearCache(getRepository().getRevisionManager());
- // ************************************************************* //
CDOSession session = openSession();
session.options().setCollectionLoadingPolicy(CDOUtil.createCollectionLoadingPolicy(10, 10));
@@ -217,7 +216,6 @@ public class ChunkingTest extends AbstractCDOTest
}
clearCache(getRepository().getRevisionManager());
- // ************************************************************* //
CDOSession session = openSession();
session.options().setCollectionLoadingPolicy(CDOUtil.createCollectionLoadingPolicy(10, 10));
@@ -242,8 +240,6 @@ public class ChunkingTest extends AbstractCDOTest
}
}
- private static final String RESOURCE_PATH = "/test";
-
public void testPartiallyLoadedAdd() throws CommitException
{
createInitialList();
@@ -257,7 +253,6 @@ public class ChunkingTest extends AbstractCDOTest
list.getElements().add(9);
tx.commit();
- tx.close();
session.close();
clearCache(getRepository().getRevisionManager());
@@ -326,20 +321,16 @@ public class ChunkingTest extends AbstractCDOTest
private void createInitialList() throws CommitException
{
- CDOSession session = openSession();
- CDOTransaction tx = session.openTransaction();
- CDOResource resource = tx.createResource(getResourcePath(RESOURCE_PATH));
-
GenListOfInt list = Model5Factory.eINSTANCE.createGenListOfInt();
-
list.getElements().addAll(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8));
+ CDOSession session = openSession();
+ CDOTransaction tx = session.openTransaction();
+ CDOResource resource = tx.createResource(getResourcePath(RESOURCE_PATH));
resource.getContents().add(list);
tx.commit();
- tx.close();
session.close();
-
clearCache(getRepository().getRevisionManager());
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_405606_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_405606_Test.java
new file mode 100644
index 0000000000..a030140494
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_405606_Test.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2013 Eike Stepper (Berlin, Germany) and others.
+ * 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.tests.bugzilla;
+
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.model1.Category;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CDOUtil;
+import org.eclipse.emf.cdo.view.CDOView;
+
+import org.eclipse.net4j.util.io.IOUtil;
+
+/**
+ * @author Eike Stepper
+ */
+public class Bugzilla_405606_Test extends AbstractCDOTest
+{
+ public void testUnchunkedRevisionWithPCL() throws Exception
+ {
+ {
+ // Set up a resource with 10 objects as content
+ CDOSession session = openSession();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource res = transaction.createResource(getResourcePath("/test"));
+
+ Category cat = getModel1Factory().createCategory();
+ cat.setName("Container");
+ res.getContents().add(cat);
+
+ for (int i = 0; i < 10; i++)
+ {
+ Category c = getModel1Factory().createCategory();
+ c.setName("Test " + i);
+ cat.getCategories().add(c);
+ }
+
+ transaction.commit();
+ session.close();
+ }
+
+ // Now clear the cache on server
+ clearCache(getRepository().getRevisionManager());
+
+ {
+ // Open a new session with PCL enabled
+ CDOSession session = openSession();
+ session.options().setCollectionLoadingPolicy(CDOUtil.createCollectionLoadingPolicy(1, 1));
+
+ // Load the category into the resource (is now partially loaded)
+ CDOView view = session.openView();
+ CDOResource res = view.getResource(getResourcePath("/test"));
+ Category cat = (Category)res.getContents().get(0);
+
+ IOUtil.OUT()
+ .println("Unchunked: " + ((InternalCDORevision)CDOUtil.getCDOObject(cat).cdoRevision()).isUnchunked());
+
+ session.close();
+ }
+
+ {
+ // Open a new session, this time with PCL disabled
+ CDOSession session = openSession();
+ session.options().setCollectionLoadingPolicy(null);
+
+ // Load the category into the resource (is now partially loaded)
+ CDOView view = session.openView();
+ CDOResource res = view.getResource(getResourcePath("/test"));
+ Category cat = (Category)res.getContents().get(0);
+
+ IOUtil.OUT()
+ .println("Unchunked: " + ((InternalCDORevision)CDOUtil.getCDOObject(cat).cdoRevision()).isUnchunked());
+
+ // Try to iterate over the items
+ for (Category child : cat.getCategories())
+ {
+ IOUtil.OUT().println(child.getName());
+ }
+
+ session.close();
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java
index 1be2dd801d..b9ea2c0655 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/RepositoryConfig.java
@@ -82,6 +82,7 @@ import java.io.FileOutputStream;
import java.io.PrintStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
+import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
@@ -231,6 +232,17 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
return repositoryProperties;
}
+ public synchronized InternalRepository[] getRepositories()
+ {
+ if (repositories == null)
+ {
+ return new InternalRepository[0];
+ }
+
+ Collection<InternalRepository> values = repositories.values();
+ return values.toArray(new InternalRepository[values.size()]);
+ }
+
public synchronized InternalRepository getRepository(String name)
{
return getRepository(name, true);
@@ -310,7 +322,7 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
protected void onDeactivated(ILifecycle lifecycle)
{
IRepository repository = (IRepository)lifecycle;
- synchronized (repositories)
+ synchronized (RepositoryConfig.this)
{
repositories.remove(repository.getName());
}
@@ -356,6 +368,10 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
{
deactivateRepositories();
}
+ else
+ {
+ resetRepositories();
+ }
if (repositories == null)
{
@@ -417,13 +433,7 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
protected void deactivateRepositories()
{
- Object[] array;
- synchronized (repositories)
- {
- array = repositories.values().toArray();
- }
-
- for (Object repository : array)
+ for (InternalRepository repository : getRepositories())
{
LifecycleUtil.deactivate(repository);
}
@@ -434,6 +444,14 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
StoreThreadLocal.release();
}
+ protected void resetRepositories()
+ {
+ for (InternalRepository repository : getRepositories())
+ {
+ repository.getRevisionManager().getCache().clear();
+ }
+ }
+
protected void addResourcePathChecker(InternalRepository repository)
{
if (resourcePathChecker == null)
@@ -473,13 +491,7 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
protected void removeResourcePathChecker()
{
- InternalRepository[] array;
- synchronized (repositories)
- {
- array = repositories.values().toArray(new InternalRepository[repositories.size()]);
- }
-
- for (InternalRepository repository : array)
+ for (InternalRepository repository : getRepositories())
{
for (Handler handler : repository.getHandlers())
{
@@ -735,7 +747,7 @@ public abstract class RepositoryConfig extends Config implements IRepositoryConf
final String masterName = "master";
InternalRepository master;
- synchronized (repositories)
+ synchronized (OfflineConfig.this)
{
master = repositories.get(masterName);
if (master == null)
diff --git a/plugins/org.eclipse.emf.cdo.workspace/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.workspace/META-INF/MANIFEST.MF
index bcb993a2bf..e62fc2cc26 100644
--- a/plugins/org.eclipse.emf.cdo.workspace/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.workspace/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.workspace;singleton:=true
-Bundle-Version: 4.1.100.qualifier
+Bundle-Version: 4.1.200.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)";resoluti
org.eclipse.emf.cdo.server.net4j;bundle-version="[4.0.0,5.0.0)",
org.eclipse.emf.cdo.net4j;bundle-version="[4.0.0,5.0.0)",
org.eclipse.net4j.jvm;bundle-version="[4.0.0,5.0.0)"
-Export-Package: org.eclipse.emf.cdo.internal.workspace;version="4.1.100";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db,org.eclipse.emf.cdo.ui.workspace",
- org.eclipse.emf.cdo.internal.workspace.bundle;version="4.1.100";x-internal:=true,
- org.eclipse.emf.cdo.spi.workspace;version="4.1.100",
- org.eclipse.emf.cdo.workspace;version="4.1.100"
+Export-Package: org.eclipse.emf.cdo.internal.workspace;version="4.1.200";x-friends:="org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.tests.db,org.eclipse.emf.cdo.ui.workspace",
+ org.eclipse.emf.cdo.internal.workspace.bundle;version="4.1.200";x-internal:=true,
+ org.eclipse.emf.cdo.spi.workspace;version="4.1.200",
+ org.eclipse.emf.cdo.workspace;version="4.1.200"
diff --git a/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/AbstractCDOWorkspaceBase.java b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/AbstractCDOWorkspaceBase.java
index 99e4502bc8..1a033939a7 100644
--- a/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/AbstractCDOWorkspaceBase.java
+++ b/plugins/org.eclipse.emf.cdo.workspace/src/org/eclipse/emf/cdo/internal/workspace/AbstractCDOWorkspaceBase.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.cdo.common.util.CDOCommonUtil;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
+import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.spi.workspace.InternalCDOWorkspace;
import org.eclipse.emf.cdo.spi.workspace.InternalCDOWorkspaceBase;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -121,10 +122,11 @@ public abstract class AbstractCDOWorkspaceBase implements InternalCDOWorkspaceBa
protected CDODataOutput createCDODataOutput(ExtendedDataOutputStream edos)
{
- InternalCDOPackageRegistry packageRegistry = workspace.getLocalRepository().getPackageRegistry(false);
+ InternalRepository localRepository = workspace.getLocalRepository();
+ InternalCDOPackageRegistry packageRegistry = localRepository.getPackageRegistry(false);
CDOIDProvider idProvider = CDOIDProvider.NOOP;
- return CDOCommonUtil.createCDODataOutput(edos, packageRegistry, idProvider);
+ return CDOCommonUtil.createCDODataOutput(edos, packageRegistry, idProvider, localRepository);
}
protected abstract void doClear();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
index e20477f37b..1385fabeae 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/session/CDOSessionImpl.java
@@ -839,6 +839,11 @@ public abstract class CDOSessionImpl extends CDOTransactionContainerImpl impleme
}
}
+ public void ensureChunks(InternalCDORevision revision, int chunkSize)
+ {
+ resolveAllElementProxies(revision);
+ }
+
public void handleRepositoryTypeChanged(CDOCommonRepository.Type oldType, CDOCommonRepository.Type newType)
{
fireEvent(new RepositoryTypeChangedEvent(this, oldType, newType));
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
index 8561e2b651..30a2876c1a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
@@ -79,6 +79,7 @@ import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataInputImpl;
import org.eclipse.emf.cdo.spi.common.protocol.CDODataOutputImpl;
import org.eclipse.emf.cdo.spi.common.revision.CDOIDMapper;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionDelta;
import org.eclipse.emf.cdo.transaction.CDOCommitContext;
@@ -1998,6 +1999,12 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
{
return getSession().getPackageRegistry();
}
+
+ @Override
+ public CDORevisionUnchunker getRevisionUnchunker()
+ {
+ return getSession();
+ }
};
List<CDOSavepoint> savepoints = new ArrayList<CDOSavepoint>();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java
index 20469d7392..a419d6488e 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/InternalCDOSession.java
@@ -29,6 +29,7 @@ import org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry.PackageLoader;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry.PackageProcessor;
+import org.eclipse.emf.cdo.spi.common.revision.CDORevisionUnchunker;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManager;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevisionManager.RevisionLocker;
@@ -52,7 +53,8 @@ import java.util.Set;
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
-public interface InternalCDOSession extends CDOSession, PackageProcessor, PackageLoader, RevisionLocker, ILifecycle
+public interface InternalCDOSession extends CDOSession, PackageProcessor, PackageLoader, RevisionLocker,
+ CDORevisionUnchunker, ILifecycle
{
public CDOSessionProtocol getSessionProtocol();

Back to the top