summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaspar De Groot2010-01-20 01:53:59 (EST)
committerCaspar De Groot2010-01-20 01:53:59 (EST)
commit0b1764ff499c54920d0d5d95ed34380948b611e8 (patch)
tree1ad5092a723a0f5a541ddfa7ec407e6b9e2baace
parentc20274851df3b5e7d9e54c006dc42652edbaa570 (diff)
downloadcdo-0b1764ff499c54920d0d5d95ed34380948b611e8.zip
cdo-0b1764ff499c54920d0d5d95ed34380948b611e8.tar.gz
cdo-0b1764ff499c54920d0d5d95ed34380948b611e8.tar.bz2
[270716] Provide support for branching
https://bugs.eclipse.org/bugs/show_bug.cgi?id=270716
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/AbstractSyncRevisionsRequest.java28
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ObjectLockedRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnlockObjectsRequest.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/AbstractSyncRevisionsIndication.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LockObjectsIndication.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/ObjectLockedIndication.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnlockObjectsIndication.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockManager.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContextImpl.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalLockManager.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerTest.java10
11 files changed, 58 insertions, 42 deletions
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/AbstractSyncRevisionsRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/AbstractSyncRevisionsRequest.java
index f5b71c3..3d2b431 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/AbstractSyncRevisionsRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/AbstractSyncRevisionsRequest.java
@@ -33,7 +33,6 @@ import java.io.IOException;
import java.text.MessageFormat;
import java.util.Collection;
import java.util.Collections;
-import java.util.Comparator;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
@@ -78,15 +77,13 @@ public abstract class AbstractSyncRevisionsRequest extends CDOClientRequest<Coll
protected Collection<CDORefreshContext> confirming(CDODataInput in) throws IOException
{
InternalCDORevisionManager revisionManager = getSession().getRevisionManager();
- Comparator<CDOBranchPoint> comparator = new Comparator<CDOBranchPoint>()
- {
- public int compare(CDOBranchPoint bp1, CDOBranchPoint bp2)
- {
- long diff = bp1.getTimeStamp() - bp2.getTimeStamp();
- return diff == 0 ? 0 : diff > 0 ? 1 : -1;
- }
- };
- Map<CDOBranchPoint, CDORefreshContext> refreshContexts = new TreeMap<CDOBranchPoint, CDORefreshContext>(comparator);
+ /*
+ * Comparator<CDOBranchPoint> comparator = new Comparator<CDOBranchPoint>() { public int compare(CDOBranchPoint bp1,
+ * CDOBranchPoint bp2) { long diff = bp1.getTimeStamp() - bp2.getTimeStamp(); return diff == 0 ? 0 : diff > 0 ? 1 :
+ * -1; } }; Map<CDOBranchPoint, CDORefreshContext> refreshContexts = new TreeMap<CDOBranchPoint,
+ * CDORefreshContext>(comparator);
+ */
+ Map<Long, CDORefreshContext> refreshContexts = new TreeMap<Long, CDORefreshContext>();
int dirtyCount = in.readInt();
for (int i = 0; i < dirtyCount; i++)
@@ -120,7 +117,8 @@ public abstract class AbstractSyncRevisionsRequest extends CDOClientRequest<Coll
CDOID id = in.readCDOID();
CDOBranchPoint branchPoint = in.readCDOBranchPoint();
- Collection<CDOID> detachedObjects = getRefreshContext(refreshContexts, branchPoint).getDetachedObjects();
+ CDORefreshContext refreshContext = getRefreshContext(refreshContexts, branchPoint);
+ Collection<CDOID> detachedObjects = refreshContext.getDetachedObjects();
detachedObjects.add(id);
}
@@ -145,14 +143,14 @@ public abstract class AbstractSyncRevisionsRequest extends CDOClientRequest<Coll
return Collections.unmodifiableCollection(refreshContexts.values());
}
- private CDORefreshContext getRefreshContext(Map<CDOBranchPoint, CDORefreshContext> refreshContexts,
- CDOBranchPoint branchPoint)
+ private CDORefreshContext getRefreshContext(Map<Long, CDORefreshContext> refreshContexts, CDOBranchPoint branchPoint)
{
- CDORefreshContext result = refreshContexts.get(branchPoint);
+ long timestamp = branchPoint.getTimeStamp();
+ CDORefreshContext result = refreshContexts.get(timestamp);
if (result == null)
{
result = new CDORefreshContextImpl(branchPoint);
- refreshContexts.put(branchPoint, result);
+ refreshContexts.put(timestamp, result);
}
return result;
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ObjectLockedRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ObjectLockedRequest.java
index 8cc2049..c563769 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ObjectLockedRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/ObjectLockedRequest.java
@@ -11,6 +11,8 @@
package org.eclipse.emf.cdo.internal.net4j.protocol;
import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.common.id.CDOIDAndBranch;
+import org.eclipse.emf.cdo.common.id.CDOIDUtil;
import org.eclipse.emf.cdo.common.io.CDODataInput;
import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
@@ -58,7 +60,8 @@ public class ObjectLockedRequest extends CDOClientRequest<Boolean>
out.writeInt(view.getViewID());
out.writeCDOLockType(lockType);
- out.writeCDOID(object.cdoID());
+ CDOIDAndBranch idAndBranch = CDOIDUtil.createIDAndBranch(object.cdoID(), view.getBranch());
+ out.writeCDOIDAndBranch(idAndBranch);
out.writeBoolean(byOthers);
}
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnlockObjectsRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnlockObjectsRequest.java
index f7a347b..a32f301 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnlockObjectsRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/UnlockObjectsRequest.java
@@ -11,6 +11,8 @@
package org.eclipse.emf.cdo.internal.net4j.protocol;
import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.common.id.CDOIDAndBranch;
+import org.eclipse.emf.cdo.common.id.CDOIDUtil;
import org.eclipse.emf.cdo.common.io.CDODataInput;
import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
@@ -75,7 +77,8 @@ public class UnlockObjectsRequest extends CDOClientRequest<Boolean>
TRACER.format("Unlocking requested for objects {0}", object.cdoID()); //$NON-NLS-1$
}
- out.writeCDOID(object.cdoID());
+ CDOIDAndBranch idAndBranch = CDOIDUtil.createIDAndBranch(object.cdoID(), view.getBranch());
+ out.writeCDOIDAndBranch(idAndBranch);
}
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/AbstractSyncRevisionsIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/AbstractSyncRevisionsIndication.java
index b83af45..0390497 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/AbstractSyncRevisionsIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/AbstractSyncRevisionsIndication.java
@@ -94,7 +94,6 @@ public abstract class AbstractSyncRevisionsIndication extends CDOReadIndication
try
{
- // $$$ Fix for branching!!
InternalCDORevision revision = (InternalCDORevision)getRepository().getRevisionManager().getRevision(id,
branchPoint, referenceChunk, CDORevision.DEPTH_NONE, true);
if (revision == null)
@@ -124,7 +123,6 @@ public abstract class AbstractSyncRevisionsIndication extends CDOReadIndication
protected long getRevisedTimestamp(CDOID id, int version, CDOBranch branch)
{
- // $$$ Fix for branching!!
CDOBranchVersion branchVersion = CDOBranchUtil.createBranchVersion(branch, version);
CDORevision revision = getRepository().getRevisionManager().getRevisionByVersion(id, branchVersion,
CDORevision.DEPTH_NONE, false);
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LockObjectsIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LockObjectsIndication.java
index 03890c0..611111d 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LockObjectsIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/LockObjectsIndication.java
@@ -11,8 +11,10 @@
*/
package org.eclipse.emf.cdo.server.internal.net4j.protocol;
-import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
+import org.eclipse.emf.cdo.common.id.CDOIDAndBranch;
import org.eclipse.emf.cdo.common.id.CDOIDAndVersionAndBranch;
+import org.eclipse.emf.cdo.common.id.CDOIDUtil;
import org.eclipse.emf.cdo.common.io.CDODataInput;
import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
@@ -32,7 +34,7 @@ public class LockObjectsIndication extends AbstractSyncRevisionsIndication
{
private LockType lockType;
- private List<CDOID> ids = new ArrayList<CDOID>();
+ private List<CDOIDAndBranch> idAndBranches = new ArrayList<CDOIDAndBranch>();
private List<CDOIDAndVersionAndBranch> idAndVersionAndBranches = new ArrayList<CDOIDAndVersionAndBranch>();
@@ -55,7 +57,7 @@ public class LockObjectsIndication extends AbstractSyncRevisionsIndication
try
{
view = getSession().getView(viewID);
- getRepository().getLockManager().lock(lockType, view, ids, timeout);
+ getRepository().getLockManager().lock(lockType, view, idAndBranches, timeout);
}
catch (InterruptedException ex)
{
@@ -73,7 +75,7 @@ public class LockObjectsIndication extends AbstractSyncRevisionsIndication
if (!detachedObjects.isEmpty())
{
- getRepository().getLockManager().unlock(lockType, view, ids);
+ getRepository().getLockManager().unlock(lockType, view, idAndBranches);
throw new IllegalArgumentException(detachedObjects.size() + " objects are not persistent anymore"); //$NON-NLS-1$
}
@@ -83,7 +85,9 @@ public class LockObjectsIndication extends AbstractSyncRevisionsIndication
@Override
protected void process(CDOIDAndVersionAndBranch idAndVersionAndBranch)
{
- ids.add(idAndVersionAndBranch.getID());
+ CDOBranch branch = getRepository().getBranchManager().getBranch(idAndVersionAndBranch.getBranchID());
+ idAndBranches.add(CDOIDUtil.createIDAndBranch(idAndVersionAndBranch.getID(), branch));
+
idAndVersionAndBranches.add(idAndVersionAndBranch);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/ObjectLockedIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/ObjectLockedIndication.java
index ee51d14..976ffde 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/ObjectLockedIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/ObjectLockedIndication.java
@@ -11,7 +11,7 @@
*/
package org.eclipse.emf.cdo.server.internal.net4j.protocol;
-import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOIDAndBranch;
import org.eclipse.emf.cdo.common.io.CDODataInput;
import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
@@ -40,15 +40,15 @@ public class ObjectLockedIndication extends CDOReadIndication
IView view = getSession().getView(viewID);
LockType lockType = in.readCDOLockType();
- CDOID id = in.readCDOID();
+ CDOIDAndBranch idAndBranch = in.readCDOIDAndBranch();
boolean byOthers = in.readBoolean();
if (byOthers)
{
- isLocked = getRepository().getLockManager().hasLockByOthers(lockType, view, id);
+ isLocked = getRepository().getLockManager().hasLockByOthers(lockType, view, idAndBranch);
}
else
{
- isLocked = getRepository().getLockManager().hasLock(lockType, view, id);
+ isLocked = getRepository().getLockManager().hasLock(lockType, view, idAndBranch);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnlockObjectsIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnlockObjectsIndication.java
index 9dc6f67..e4c9cfa 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnlockObjectsIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/UnlockObjectsIndication.java
@@ -11,7 +11,7 @@
*/
package org.eclipse.emf.cdo.server.internal.net4j.protocol;
-import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOIDAndBranch;
import org.eclipse.emf.cdo.common.io.CDODataInput;
import org.eclipse.emf.cdo.common.io.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocolConstants;
@@ -47,14 +47,14 @@ public class UnlockObjectsIndication extends CDOReadIndication
}
else
{
- List<CDOID> ids = new ArrayList<CDOID>(size);
+ List<CDOIDAndBranch> idAndBranches = new ArrayList<CDOIDAndBranch>(size);
for (int i = 0; i < size; i++)
{
- CDOID id = in.readCDOID();
- ids.add(id);
+ CDOIDAndBranch idAndBranch = in.readCDOIDAndBranch();
+ idAndBranches.add(idAndBranch);
}
- getRepository().getLockManager().unlock(lockType, view, ids);
+ getRepository().getLockManager().unlock(lockType, view, idAndBranches);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockManager.java
index 41e5962..d8b84f9 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockManager.java
@@ -11,7 +11,7 @@
*/
package org.eclipse.emf.cdo.internal.server;
-import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOIDAndBranch;
import org.eclipse.emf.cdo.server.ISession;
import org.eclipse.emf.cdo.server.ISessionManager;
import org.eclipse.emf.cdo.server.IView;
@@ -28,7 +28,7 @@ import org.eclipse.net4j.util.event.IListener;
* @author Simon McDuff
* @since 3.0
*/
-public class LockManager extends RWLockManager<CDOID, IView> implements InternalLockManager
+public class LockManager extends RWLockManager<CDOIDAndBranch, IView> implements InternalLockManager
{
private InternalRepository repository;
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContextImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContextImpl.java
index 7c9bd26..ba67d9e 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContextImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/TransactionCommitContextImpl.java
@@ -11,8 +11,10 @@
*/
package org.eclipse.emf.cdo.internal.server;
+import org.eclipse.emf.cdo.common.branch.CDOBranch;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOIDAndBranch;
import org.eclipse.emf.cdo.common.id.CDOIDMetaRange;
import org.eclipse.emf.cdo.common.id.CDOIDTemp;
import org.eclipse.emf.cdo.common.id.CDOIDUtil;
@@ -78,7 +80,7 @@ public class TransactionCommitContextImpl implements InternalCommitContext
private CDOID[] detachedObjects;
- private List<CDOID> lockedObjects = new ArrayList<CDOID>();
+ private List<CDOIDAndBranch> lockedObjects = new ArrayList<CDOIDAndBranch>();
private List<InternalCDORevision> detachedRevisions = new ArrayList<InternalCDORevision>();;
@@ -414,15 +416,17 @@ public class TransactionCommitContextImpl implements InternalCommitContext
private void lockObjects() throws InterruptedException
{
+ CDOBranch branch = getTransaction().getBranch();
+
lockedObjects.clear();
for (int i = 0; i < dirtyObjectDeltas.length; i++)
{
- lockedObjects.add(dirtyObjectDeltas[i].getID());
+ lockedObjects.add(CDOIDUtil.createIDAndBranch(dirtyObjectDeltas[i].getID(), branch));
}
for (int i = 0; i < detachedObjects.length; i++)
{
- lockedObjects.add(detachedObjects[i]);
+ lockedObjects.add(CDOIDUtil.createIDAndBranch(detachedObjects[i], branch));
}
try
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalLockManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalLockManager.java
index 2a8d3e8..92dc7d4 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalLockManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/InternalLockManager.java
@@ -10,7 +10,7 @@
*/
package org.eclipse.emf.cdo.spi.server;
-import org.eclipse.emf.cdo.common.id.CDOID;
+import org.eclipse.emf.cdo.common.id.CDOIDAndBranch;
import org.eclipse.emf.cdo.server.IView;
import org.eclipse.net4j.util.concurrent.IRWLockManager;
@@ -19,7 +19,7 @@ import org.eclipse.net4j.util.concurrent.IRWLockManager;
* @author Eike Stepper
* @since 3.0
*/
-public interface InternalLockManager extends IRWLockManager<CDOID, IView>
+public interface InternalLockManager extends IRWLockManager<CDOIDAndBranch, IView>
{
public InternalRepository getRepository();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerTest.java
index e42adee..5605d1a 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LockingManagerTest.java
@@ -13,6 +13,8 @@ package org.eclipse.emf.cdo.tests;
import org.eclipse.emf.cdo.CDOLock;
import org.eclipse.emf.cdo.CDOObject;
+import org.eclipse.emf.cdo.common.id.CDOIDAndBranch;
+import org.eclipse.emf.cdo.common.id.CDOIDUtil;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.server.IView;
import org.eclipse.emf.cdo.session.CDOSession;
@@ -545,7 +547,9 @@ public class LockingManagerTest extends AbstractCDOTest
CDOObject cdoCompany = CDOUtil.getCDOObject(company);
cdoCompany.cdoReadLock().lock();
transaction.close();
- assertEquals(false, repo.getLockManager().hasLock(LockType.READ, view, cdoCompany.cdoID()));
+
+ CDOIDAndBranch idAndBranch = CDOIDUtil.createIDAndBranch(cdoCompany.cdoID(), transaction.getBranch());
+ assertEquals(false, repo.getLockManager().hasLock(LockType.READ, view, idAndBranch));
}
public void testSessionClose() throws Exception
@@ -566,7 +570,9 @@ public class LockingManagerTest extends AbstractCDOTest
session.close();
sleep(100);
- assertEquals(false, repo.getLockManager().hasLock(LockType.READ, view, cdoCompany.cdoID()));
+
+ CDOIDAndBranch idAndBranch = CDOIDUtil.createIDAndBranch(cdoCompany.cdoID(), transaction.getBranch());
+ assertEquals(false, repo.getLockManager().hasLock(LockType.READ, view, idAndBranch));
}
public void testBugzilla_270345() throws Exception