Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--features/org.eclipse.emf.cdo.server-feature/feature.xml2
-rw-r--r--features/org.eclipse.emf.cdo.tests-feature/feature.xml2
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/META-INF/MANIFEST.MF12
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LockStateRequest.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF24
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_466951_Test.java20
-rw-r--r--plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF52
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java26
8 files changed, 95 insertions, 50 deletions
diff --git a/features/org.eclipse.emf.cdo.server-feature/feature.xml b/features/org.eclipse.emf.cdo.server-feature/feature.xml
index 440a210e32..ecf1d8dd0f 100644
--- a/features/org.eclipse.emf.cdo.server-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.server-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.emf.cdo.server"
label="%featureName"
- version="4.4.0.qualifier"
+ version="4.4.100.qualifier"
provider-name="%providerName"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.emf.cdo.license"
diff --git a/features/org.eclipse.emf.cdo.tests-feature/feature.xml b/features/org.eclipse.emf.cdo.tests-feature/feature.xml
index 2b9e6228bf..cc83364226 100644
--- a/features/org.eclipse.emf.cdo.tests-feature/feature.xml
+++ b/features/org.eclipse.emf.cdo.tests-feature/feature.xml
@@ -12,7 +12,7 @@
<feature
id="org.eclipse.emf.cdo.tests"
label="%featureName"
- version="4.2.200.qualifier"
+ version="4.2.300.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.emf.cdo.license"
license-feature-version="0.0.0">
diff --git a/plugins/org.eclipse.emf.cdo.net4j/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.net4j/META-INF/MANIFEST.MF
index 72131b1b60..32eca96ebf 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.net4j/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.net4j; singleton:=true
-Bundle-Version: 4.1.300.qualifier
+Bundle-Version: 4.1.400.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -10,17 +10,17 @@ Bundle-Activator: org.eclipse.emf.cdo.internal.net4j.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.emf.cdo;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.internal.net4j;version="4.1.300";
+Export-Package: org.eclipse.emf.cdo.internal.net4j;version="4.1.400";
x-friends:="org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.defs,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.examples",
- org.eclipse.emf.cdo.internal.net4j.bundle;version="4.1.300";x-friends:="org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.internal.net4j.messages;version="4.1.300";x-internal:=true,
- org.eclipse.emf.cdo.internal.net4j.protocol;version="4.1.300";
+ org.eclipse.emf.cdo.internal.net4j.bundle;version="4.1.400";x-friends:="org.eclipse.emf.cdo.tests",
+ org.eclipse.emf.cdo.internal.net4j.messages;version="4.1.400";x-internal:=true,
+ org.eclipse.emf.cdo.internal.net4j.protocol;version="4.1.400";
x-friends:="org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.defs,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.examples",
- org.eclipse.emf.cdo.net4j;version="4.1.300"
+ org.eclipse.emf.cdo.net4j;version="4.1.400"
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LockStateRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LockStateRequest.java
index 6815ce0125..46de19b6fd 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LockStateRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/LockStateRequest.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
import java.io.IOException;
+import java.text.MessageFormat;
import java.util.Collection;
/**
@@ -71,4 +72,10 @@ public class LockStateRequest extends CDOClientRequest<CDOLockState[]>
return lockStates;
}
+
+ @Override
+ public String toString()
+ {
+ return MessageFormat.format("LockStateRequest(viewID={0}, ids={1}, prefetchDepth={2})", viewID, ids, prefetchDepth);
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
index 3311db4835..3e0f2ff4cd 100644
--- a/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.tests;singleton:=true
-Bundle-Version: 4.0.400.qualifier
+Bundle-Version: 4.0.500.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -47,17 +47,17 @@ Export-Package: base;version="4.0.200",
interface_;version="4.0.200",
interface_.impl;version="4.0.200",
interface_.util;version="4.0.200",
- org.eclipse.emf.cdo.tests;version="4.0.400",
- org.eclipse.emf.cdo.tests.bugzilla;version="4.0.400",
- org.eclipse.emf.cdo.tests.bundle;version="4.0.400";x-internal:=true,
- org.eclipse.emf.cdo.tests.config;version="4.0.400",
- org.eclipse.emf.cdo.tests.config.impl;version="4.0.400",
- org.eclipse.emf.cdo.tests.defs;version="4.0.400",
- org.eclipse.emf.cdo.tests.offline;version="4.0.400",
- org.eclipse.emf.cdo.tests.performance;version="4.0.400",
- org.eclipse.emf.cdo.tests.performance.framework;version="4.0.400",
- org.eclipse.emf.cdo.tests.revisioncache;version="4.0.400",
- org.eclipse.emf.cdo.tests.util;version="4.0.400",
+ org.eclipse.emf.cdo.tests;version="4.0.500",
+ org.eclipse.emf.cdo.tests.bugzilla;version="4.0.500",
+ org.eclipse.emf.cdo.tests.bundle;version="4.0.500";x-internal:=true,
+ org.eclipse.emf.cdo.tests.config;version="4.0.500",
+ org.eclipse.emf.cdo.tests.config.impl;version="4.0.500",
+ org.eclipse.emf.cdo.tests.defs;version="4.0.500",
+ org.eclipse.emf.cdo.tests.offline;version="4.0.500",
+ org.eclipse.emf.cdo.tests.performance;version="4.0.500",
+ org.eclipse.emf.cdo.tests.performance.framework;version="4.0.500",
+ org.eclipse.emf.cdo.tests.revisioncache;version="4.0.500",
+ org.eclipse.emf.cdo.tests.util;version="4.0.500",
reference;version="4.0.200",
reference.impl;version="4.0.200";
x-friends:="org.eclipse.emf.cdo.dawn.tests,
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_466951_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_466951_Test.java
index 7beb2eee97..05089e9ece 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_466951_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_466951_Test.java
@@ -42,12 +42,13 @@ public class Bugzilla_466951_Test extends AbstractCDOTest
private static final String RESOURCE_NAME = "test1.model1";
/**
- * Test that no {@link LockStateRequest} is sent to the server when calling {@link CDOObject#cdoLockState()}
+ * Test that no {@link LockStateRequest} is sent to the server when calling {@link CDOObject#cdoLockState()} for {@link CDOObject} in {@link CDOState#NEW} state.
*/
public void testCDOObjectCDOLockState() throws Exception
{
CDOSession session1 = openSession();
CDOTransaction transaction1 = session1.openTransaction();
+ transaction1.options().setAutoReleaseLocksEnabled(false);
transaction1.options().setLockNotificationEnabled(true);
CDOResource resource1 = transaction1.createResource(getResourcePath(RESOURCE_NAME));
Company company = getModel1Factory().createCompany();
@@ -109,6 +110,23 @@ public class Bugzilla_466951_Test extends AbstractCDOTest
nbLockStateRequest = signalCounter.getCountFor(LockStateRequest.class);
assertEquals(0, nbLockStateRequest);
+ transaction1.commit();
+
+ lockState = companyCDOObject2.cdoLockState();
+ expectedLockedObject = companyCDOObject2.cdoID();
+ if (session1.getRepositoryInfo().isSupportingBranches())
+ {
+ expectedLockedObject = CDOIDUtil.createIDAndBranch(companyCDOObject2.cdoID(), transaction1.getBranch());
+ }
+
+ assertEquals(expectedLockedObject, lockState.getLockedObject());
+ Assert.assertTrue(lockState.getReadLockOwners().isEmpty());
+ assertNull(lockState.getWriteLockOwner());
+ assertNull(lockState.getWriteOptionOwner());
+
+ nbLockStateRequest = signalCounter.getCountFor(LockStateRequest.class);
+ assertEquals(0, nbLockStateRequest);
+
protocol.removeListener(signalCounter);
}
}
diff --git a/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF
index 357c90d91f..be8cc10765 100644
--- a/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo; singleton:=true
-Bundle-Version: 4.4.0.qualifier
+Bundle-Version: 4.4.100.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -10,29 +10,29 @@ Bundle-Activator: org.eclipse.emf.internal.cdo.bundle.Activator$Implementation
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)";resolution:=optional,
org.eclipse.emf.cdo.common;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo;version="4.4.0",
- org.eclipse.emf.cdo.eresource;version="4.4.0",
- org.eclipse.emf.cdo.eresource.impl;version="4.4.0",
- org.eclipse.emf.cdo.eresource.util;version="4.4.0",
- org.eclipse.emf.cdo.eresource.validation;version="4.4.0",
- org.eclipse.emf.cdo.etypes;version="4.4.0",
- org.eclipse.emf.cdo.etypes.impl;version="4.4.0",
- org.eclipse.emf.cdo.etypes.util;version="4.4.0",
- org.eclipse.emf.cdo.session;version="4.4.0",
- org.eclipse.emf.cdo.session.remote;version="4.4.0",
- org.eclipse.emf.cdo.transaction;version="4.4.0",
- org.eclipse.emf.cdo.util;version="4.4.0",
- org.eclipse.emf.cdo.view;version="4.4.0",
- org.eclipse.emf.internal.cdo;version="4.4.0",
- org.eclipse.emf.internal.cdo.analyzer;version="4.4.0";
+Export-Package: org.eclipse.emf.cdo;version="4.4.100",
+ org.eclipse.emf.cdo.eresource;version="4.4.100",
+ org.eclipse.emf.cdo.eresource.impl;version="4.4.100",
+ org.eclipse.emf.cdo.eresource.util;version="4.4.100",
+ org.eclipse.emf.cdo.eresource.validation;version="4.4.100",
+ org.eclipse.emf.cdo.etypes;version="4.4.100",
+ org.eclipse.emf.cdo.etypes.impl;version="4.4.100",
+ org.eclipse.emf.cdo.etypes.util;version="4.4.100",
+ org.eclipse.emf.cdo.session;version="4.4.100",
+ org.eclipse.emf.cdo.session.remote;version="4.4.100",
+ org.eclipse.emf.cdo.transaction;version="4.4.100",
+ org.eclipse.emf.cdo.util;version="4.4.100",
+ org.eclipse.emf.cdo.view;version="4.4.100",
+ org.eclipse.emf.internal.cdo;version="4.4.100",
+ org.eclipse.emf.internal.cdo.analyzer;version="4.4.100";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.defs,
org.eclipse.emf.cdo.ui",
- org.eclipse.emf.internal.cdo.bundle;version="4.4.0";x-friends:="org.eclipse.emf.cdo.ui",
- org.eclipse.emf.internal.cdo.messages;version="4.4.0";x-internal:=true,
- org.eclipse.emf.internal.cdo.object;version="4.4.0";
+ org.eclipse.emf.internal.cdo.bundle;version="4.4.100";x-friends:="org.eclipse.emf.cdo.ui",
+ org.eclipse.emf.internal.cdo.messages;version="4.4.100";x-internal:=true,
+ org.eclipse.emf.internal.cdo.object;version="4.4.100";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
@@ -42,14 +42,14 @@ Export-Package: org.eclipse.emf.cdo;version="4.4.0",
org.eclipse.emf.cdo.explorer,
org.eclipse.emf.cdo.explorer.ui,
org.eclipse.emf.cdo.edit",
- org.eclipse.emf.internal.cdo.query;version="4.4.0";
+ org.eclipse.emf.internal.cdo.query;version="4.4.100";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.defs,
org.eclipse.emf.cdo.ui,
org.eclipse.emf.cdo.tests.objectivity",
- org.eclipse.emf.internal.cdo.session;version="4.4.0";
+ org.eclipse.emf.internal.cdo.session;version="4.4.100";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
@@ -60,25 +60,25 @@ Export-Package: org.eclipse.emf.cdo;version="4.4.0",
org.eclipse.emf.cdo.security.ui,
org.eclipse.emf.cdo.explorer,
org.eclipse.emf.cdo.explorer.ui",
- org.eclipse.emf.internal.cdo.session.remote;version="4.4.0";
+ org.eclipse.emf.internal.cdo.session.remote;version="4.4.100";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.defs,
org.eclipse.emf.cdo.ui",
- org.eclipse.emf.internal.cdo.transaction;version="4.4.0";
+ org.eclipse.emf.internal.cdo.transaction;version="4.4.100";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.defs,
org.eclipse.emf.cdo.ui",
- org.eclipse.emf.internal.cdo.util;version="4.4.0";
+ org.eclipse.emf.internal.cdo.util;version="4.4.100";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.defs,
org.eclipse.emf.cdo.ui",
- org.eclipse.emf.internal.cdo.view;version="4.4.0";
+ org.eclipse.emf.internal.cdo.view;version="4.4.100";
x-friends:="org.eclipse.emf.cdo.net4j,
org.eclipse.emf.cdo.server,
org.eclipse.emf.cdo.tests,
@@ -87,5 +87,5 @@ Export-Package: org.eclipse.emf.cdo;version="4.4.0",
org.eclipse.emf.cdo.ui.ide,
org.eclipse.emf.cdo.explorer,
org.eclipse.emf.cdo.explorer.ui",
- org.eclipse.emf.spi.cdo;version="4.4.0"
+ org.eclipse.emf.spi.cdo;version="4.4.100"
Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
index 6f512fa4dc..03c2c13af6 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
@@ -738,6 +738,26 @@ public class CDOViewImpl extends AbstractCDOView
return revisionManager.getRevision(id, branchPoint, initialChunkSize, CDORevision.DEPTH_NONE, loadOnDemand);
}
+ @Override
+ public synchronized void remapObject(CDOID oldID)
+ {
+ InternalCDOObject object = getObject(oldID, false);
+ InternalCDOLockState oldLockState = (InternalCDOLockState)lockStates.get(object);
+ if (oldLockState != null)
+ {
+ oldLockState.updateFrom(getLockTarget(object), oldLockState);
+ }
+ super.remapObject(oldID);
+ }
+
+ @Override
+ public synchronized InternalCDOObject removeObject(CDOID id)
+ {
+ InternalCDOObject removedObject = super.removeObject(id);
+ removeLockState(removedObject);
+ return removedObject;
+ }
+
public synchronized CDOLockState[] getLockStates(Collection<CDOID> ids)
{
return getLockStates(ids, true);
@@ -814,11 +834,11 @@ public class CDOViewImpl extends AbstractCDOView
{
updateLockStates(newLockStateForCache.toArray(new CDOLockState[newLockStateForCache.size()]));
}
-
- CDOLockState[] locksOnNewObjectsArray = locksOnNewObjects.toArray(new CDOLockState[locksOnNewObjects.size()]);
- updateLockStates(locksOnNewObjectsArray);
}
+ CDOLockState[] locksOnNewObjectsArray = locksOnNewObjects.toArray(new CDOLockState[locksOnNewObjects.size()]);
+ updateLockStates(locksOnNewObjectsArray);
+
return lockStates.toArray(new CDOLockState[lockStates.size()]);
}

Back to the top