| Summary: | New API for opening Transactions on a specific branch with durable locking ID | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Alex Lagarde <alex.lagarde> |
| Component: | cdo.core | Assignee: | Project Inbox <emf.cdo-inbox> |
| Status: | CLOSED WORKSFORME | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | stepper |
| Version: | 4.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Alex Lagarde
Hi Alex, Locks are generally scoped to a specific branch and can not be transfered to other branches. In addition to the absence of API for that there are server side checks to prevent from accidentally "reinterpreting" locks from other branches. This is by design and I can not see a reason why one would like to relax that. I'm closing this as WONTFIX until someone can explain to me why moving locks between branches makes sense. Please note that durable locks really lock objects in a branch to a view/owner. That ownership can be transfered to other views, but nothing else. Hi Eike, thanks for your fast reply. If I open a transaction on a branch b1, with enableLockindID() == true, and then try to reopen it later using my lockingID, will the transaction be opened automatically on the branch b1 ? If this is the case then the existing API fulfill my need. I agree with you that transfering locks from one branch to another does not have any sense. Yes, this code in CDOViewImpl shows it:
protected void doActivate() throws Exception
{
CDOSessionProtocol sessionProtocol = session.getSessionProtocol();
if (durableLockingID != null)
{
CDOBranchPoint branchPoint = sessionProtocol.openView(viewID, isReadOnly(), durableLockingID);
basicSetBranchPoint(branchPoint);
}
else
{
sessionProtocol.openView(viewID, isReadOnly(), this);
}
}
;-)
|