Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [cdo] how several CDO transactions can commit their changes using one durable view?
[cdo] how several CDO transactions can commit their changes using one durable view? [message #1248943] Mon, 17 February 2014 20:33 Go to next message
Evgeniy Vishnyakov is currently offline Evgeniy VishnyakovFriend
Messages: 2
Registered: February 2014
Junior Member
Hi all,

Our project works with CDO. There is a common strategy: every editor corresponds a single transaction.

Now I faced with a problem of using durable views.
Users want take several write locks on different CDO resources within one durable view and open several editors to modify these resources, but there is no way to open several instances of a durable view with the same LockingID.

Is there any idea how several CDO transactions can commit their changes using one durable view?

Thanks,
Evgeniy
Re: [cdo] how several CDO transactions can commit their changes using one durable view? [message #1249385 is a reply to message #1248943] Tue, 18 February 2014 07:37 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6457
Registered: July 2009
Senior Member
Am 17.02.2014 22:02, schrieb Evgeniy Vishnyakov:
> Hi all,
>
> Our project works with CDO. There is a common strategy: every editor corresponds a single transaction.
>
> Now I faced with a problem of using durable views.
> Users want take several write locks on different CDO resources within one durable view and open several editors to
> modify these resources, but there is no way to open several instances of a durable view with the same LockingID.
>
> Is there any idea how several CDO transactions can commit their changes using one durable view?
A CDOLock always has a single CDOLockOwner, which, on the client side is the CDOTransaction or CDOView. In other words,
CDOObjects are always locked into their current view. The only way to change that is to either unlock the object, either
explicitely or by committing the transaction with autoReleaseLocks=true. An exception to this rule is a durable view,
which can be closed and then the locks be "taken over" by another view (that knows the secret durable locking ID).

A CDOTransaction is a means to isolate changes from other views. As such I see no way to let several transactions share
their locks. You'll probably have to look for a way to let your editors share a single CDOTransaction, similar to the
CDO Sessions view part that maintains shared transactions for multiple editor instances each.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [cdo] how several CDO transactions can commit their changes using one durable view? [message #1249495 is a reply to message #1249385] Tue, 18 February 2014 09:59 Go to previous messageGo to next message
Evgeniy Vishnyakov is currently offline Evgeniy VishnyakovFriend
Messages: 2
Registered: February 2014
Junior Member
In case we will use one CDO transaction for several editors after saving one of them other ones will be saved too. But it's actually not what we need.

Thanks,
Evgeniy
Re: [cdo] how several CDO transactions can commit their changes using one durable view? [message #1249507 is a reply to message #1249495] Tue, 18 February 2014 10:14 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6457
Registered: July 2009
Senior Member
Am 18.02.2014 10:59, schrieb Evgeniy Vishnyakov:
> In case we will use one CDO transaction for several editors after saving one of them other ones will be saved too. But
> it's actually not what we need.
Yes, with CDO you always commit the underlying transaction when you save a single resource. And note that a normal model
editor lets you edit an entire resource set, so that saving the editor may save a bunch of resources (which will lead to
a single commit in CDO).

You might want to play with CDOTransaction.setCommittables(), which you can use for partial commits. You'd have to think
about the case of multiple editors modifying the (logically and physically) same object. Also note that
setCommittables() doesn't let you commit inconsistent subsets of the dirty/new objects.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:Serialization of EType Parameter
Next Topic:EditingSupport and EditingDomain
Goto Forum:
  


Current Time: Wed Dec 11 18:55:41 GMT 2019

Powered by FUDForum. Page generated in 0.01380 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top