Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316421 - Provide an option to lock reference targets during commit
Summary: Provide an option to lock reference targets during commit
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard: offline-07
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-10 03:21 EDT by Erwin Betschart CLA
Modified: 2010-06-29 09:20 EDT (History)
1 user (show)

See Also:


Attachments
Patch for future reference (6.56 KB, patch)
2010-06-13 01:34 EDT, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erwin Betschart CLA 2010-06-10 03:21:03 EDT
Build Identifier: 3.0

CDO should provide an option to lock outgoing reference targets during commit. 
This would prevent a case of stale references.
E.g.: 
Object A references object B. When changing and committing the object A also object B should be locked so that no one can remove object B.

Reproducible: Always
Comment 1 Caspar D. CLA 2010-06-10 06:19:00 EDT
Doesn't this duplicate bug 315407 ?
Comment 2 Eike Stepper CLA 2010-06-13 01:31:08 EDT
The new reference target locking can be switched on with a new *boolean* repository property:

   IStoreAccessor.CommitContext.PROP_AUTO_LOCK_NEW_TARGETS = "autoLockNewTargets"
   
It is off by default!
Comment 3 Eike Stepper CLA 2010-06-13 01:31:24 EDT
Committed to HEAD
Comment 4 Eike Stepper CLA 2010-06-13 01:34:38 EDT
Created attachment 171792 [details]
Patch for future reference
Comment 5 Eike Stepper CLA 2010-06-13 02:57:58 EDT
Update: The property has been moved to IRepository.Props.AUTO_LOCK_NEW_TARGETS
Comment 6 Eike Stepper CLA 2010-06-29 04:40:04 EDT
Available in 3.0 GA:
http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/