[CDO] - exportChanges and detached Objects [message #908986] |
Thu, 06 September 2012 07:02  |
Eclipse User |
|
|
|
Hi,
why is exportChanges in CDOTransactionImpl ignoring detached objects?
How are deleted objects processed?
By the way, what is the exact meaning of detach in context of CDO? As far as I understand it is often used as synonym for delete.
For me detach means, removing the current object from the context and not deleting it.
Best regards,
Joe
[Updated on: Thu, 06 September 2012 07:08] by Moderator
|
|
|
|
|
|
|
|
|
Re: [CDO] - exportChanges and detached Objects [message #912299 is a reply to message #912279] |
Thu, 13 September 2012 05:36  |
Eclipse User |
|
|
|
Am 13.09.2012 10:57, schrieb Joe Sobeos:
>> Not that I know of. What kind of information are you looking for?
>
> Transaction behaviour in general.
That's too, eh, general :P
> -> what happens when two or more transactions modify the same object?
They can modify it at the same time if none of them acquired an explicit lock. They can try to commit at the same time
but the server will choose one transaction to succeed first. The other one will fail. If passive updates are enabled it
may happen (depending on the actual timing) that one transaction is notified about the success of the other transaction
and cannot even commit anymore.
> A picture would be nice here.
Maybe, but I don't have time right now to make one ;-(
> -> are there any options?
Have a look at CDOTransaction.options().
>> In general yes, but not necessarily. A CDOTransaction receives CommitNotifications > from commits of other
>> transactions which can directly (and early) detect conflicts before even committing. Because of > possible network
>> race conditions there's always (unless you use explicit locking) a "rest" potential for server-
>> side ConcurrentModificationException.
> I would expect to get ConcurrentModificationExceptions with long running transactions.
>
> Is the CDOTransaction handling the ComitNotifications automatically? Or do I have to implement something?
It handles them automatically. If changes arrive for objects that are locally dirty then an application supplied
CDOConflictResolver has the chance to resolve that conflict. If it cannot then the object transitions to
CDOState.CONFLICT and CDOTransaction.hasConflict() will return true.
> I see two scenarios:
> a) I want to get all properties of my object get updated immadiately
Use CDOSession.options().setPassiveUpdateEnabled(true).
> b) I don't want to get any property updated at all for a specified object
Use CDOSession.options().setPassiveUpdateEnabled(false).
Note that this affects *all* views/transactions of that session.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.04470 seconds