Home » Modeling » EMF » Need to modify the locking mechanism in CDO
|
Re: Need to modify the locking mechanism in CDO [message #945263 is a reply to message #945181] |
Mon, 15 October 2012 10:15 |
|
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
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 08:04 |
|
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
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 #952250 is a reply to message #952043] |
Sun, 21 October 2012 09:36 |
UmaShankar Subramani Messages: 194 Registered: December 2011 Location: SWEDEN |
Senior Member |
|
|
Hi Eike,
Thanks. It works as expected.
But, I want to slightly modify the same functionality as below.
If I click on an object, its parent should be locked automatically. And it should remain locked, until I click on another object.
Clicking on an object means that, I am working on that object. So, the parent of the object should be locked automatically. Is it possible?
[Updated on: Sun, 21 October 2012 09:41] Report message to a moderator
|
|
| | | | |
Goto Forum:
Current Time: Wed Sep 25 21:59:40 GMT 2024
Powered by FUDForum. Page generated in 0.08654 seconds
|