Home » Modeling » EMF » Need to modify the locking mechanism in CDO
Need to modify the locking mechanism in CDO [message #945181] |
Mon, 15 October 2012 05:27  |
Eclipse User |
|
|
|
Hi,
I am doing my Master Thesis based on CDO and DAWN. Currently I am doing research on existing locking mechanism in DAWN editors(for example, locking mechanisms in the dawn editors like "DAWN Acore Editor").
I have installed the source of CDO. From this, I could lock the EMF objects by the help of context menu Lock-> Lock Object.
I need to extend this feature like the following:
If an user is current editing an object, it should be automatically locked for him. Then, the object should be automatically unlocked, as soon as he starts editing another object.
Any tips for adding this feature to the CDO source(locally in my workspace) will be appreciated.
|
|
|
Re: Need to modify the locking mechanism in CDO [message #945263 is a reply to message #945181] |
Mon, 15 October 2012 06:15   |
Eclipse User |
|
|
|
Am 15.10.2012 11:27, schrieb UmaShankar Subramani:
> Hi,
>
> I am doing my Master Thesis based on CDO and DAWN. Currently I am doing research on existing locking mechanism in
> DAWN editors(for example, locking mechanisms in the dawn editors like "DAWN Acore Editor").
>
> I have installed the source of CDO. From this, I could lock the EMF objects by the help of context menu Lock-> Lock
> Object.
>
> I need to extend this feature like the following:
>
> If an user is current editing an object, it should be automatically locked for him.
You can add a CDOTransactionHandler1 (or CDODefaultTransactionHandler1) to the local CDOTransaction and implement the
modifyingObject() method to be notified *before* any object is modified. There you can, for example, acquire a lock on
the to-be-modified object.
> Then, the object should be automatically unlocked, as soon as he starts editing another object.
Without a prior commit()?
>
> Any tips for adding this feature to the CDO source(locally in my workspace) will be appreciated.
What you want to do seems similar to this: http://fmadiot.blogspot.de/2012/10/how-to-share-modeling-project-with.html
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| |
Re: Need to modify the locking mechanism in CDO [message #946539 is a reply to message #946448] |
Tue, 16 October 2012 04:04   |
Eclipse User |
|
|
|
Am 16.10.2012 09:57, schrieb UmaShankar Subramani:
> Hi,
>
> Thanks for replying. I will try doing this and get back to you, if I face some problems.
>
>
> Please see the comments below:
>
>> Without a prior commit()?
>
> Yes, it is because, Just to make sure that, another guy is not editing the same object, at the same time. But once,
> editing is done, it is available to others very soon.
Please note that CDO, by default, automatically and atomically releases all locks at commit time.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | |
Goto Forum:
Current Time: Tue Jul 22 19:21:53 EDT 2025
Powered by FUDForum. Page generated in 0.07711 seconds
|