Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon McDuff2009-05-05 13:18:22 -0400
committerSimon McDuff2009-05-05 13:18:22 -0400
commita02b77d129b156a9b2f890c9ccc7f3b92bff5c8d (patch)
tree6b0937c3bc827a7b64260b8b363aed79399ab9d1 /plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction
parent2eb469923825c61b07548b638aee35f3d2ec2985 (diff)
downloadcdo-a02b77d129b156a9b2f890c9ccc7f3b92bff5c8d.tar.gz
cdo-a02b77d129b156a9b2f890c9ccc7f3b92bff5c8d.tar.xz
cdo-a02b77d129b156a9b2f890c9ccc7f3b92bff5c8d.zip
[273565] Concurrency problem: attribute of enumeration type not updated correctly between two clients
https://bugs.eclipse.org/bugs/show_bug.cgi?id=273565
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction')
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java25
1 files changed, 25 insertions, 0 deletions
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 901728748d..a323935063 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
@@ -285,6 +285,31 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
conflict -= resolved;
}
+ @Override
+ public void getCDOIDAndVersion(Map<CDOID, CDOIDAndVersion> uniqueObjects, Collection<? extends CDOObject> cdoObjects)
+ {
+ Map<CDOID, CDORevisionDelta> deltaMap = getRevisionDeltas();
+
+ for (CDOObject cdoObject : cdoObjects)
+ {
+ CDORevision cdoRevision = CDOStateMachine.INSTANCE.readNoLoad((InternalCDOObject)cdoObject);
+ CDOID cdoId = cdoObject.cdoID();
+ if (cdoRevision != null && !cdoId.isTemporary() && !uniqueObjects.containsKey(cdoId))
+ {
+ int version = cdoRevision.getVersion();
+ if (deltaMap != null)
+ {
+ CDORevisionDelta delta = deltaMap.get(cdoId);
+ if (delta != null)
+ {
+ version = delta.getOriginVersion();
+ }
+ }
+ uniqueObjects.put(cdoId, CDOIDUtil.createIDAndVersion(cdoId, version));
+ }
+ }
+ }
+
/**
* @since 2.0
*/

Back to the top