[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.emf] Re: [CDO] CDOSavePoint and rollback question
|
- From: Eike Stepper <stepper@xxxxxxxxxx>
- Date: Tue, 12 May 2009 17:03:55 +0200
- Newsgroups: eclipse.tools.emf
- Organization: EclipseCorner
- User-agent: Thunderbird 2.0.0.21 (Windows/20090302)
Sebastian Paul schrieb:
>
>> On the other side, is it so bad that the UI of the view updates while
>> the wizard is used. Ok, it's not good design, but it doesn't break
>> anything, or?
> This is at least uncommon. But as long as your UI correctly tracks the
> model state, rolling back should bring the UI into the state before
> the wizard was started.
Usually a rollback brings the local state to the one that is current in
the repository and not to the one the client had before the transaction
started.
The reason is that an attempt to commit changes based on that old state
would certainly not succeed.
>>
>> I can't really follow with your last part. Committing what
>> transaction? That of the wizard? I guess you mean as you use the
>> MemStore, the document is not persisted (in a database or file). Right?
>> In my setup for example a document is saved as I use the DerbyStore.
>> When I commit a transaction (when the wizard is finished), the model
>> is stored to the database. Or do you mean something different?
> Yes exactly, committing does not mean saving in my example app. There
> is no persistence at all, yet. The Store just holds the current state
> of the model.
"Committing" always means "transfer local changes to the repository (and
its IStore), if not prevented by concurrency control".
Usually "saving" is meant as a synonym, no matter if the concrete IStore
implementation saves to a file system or other persistent back-end.
> When persistence should be done with CDO, too, my approach seems not
> to be appropriate.
>
> I' wondering whether an application can deal with two sessions - one
> session with MemStore and one Session for the DbStore. Work is done on
> the MemStore session, and saving/persisting is done on the DbStore
> session. This would be similar to a nested transaction, where the
> outer transaction saves the model, while inner transactions
> encapsulate things like wizards. But I have no idea how to pass the
> final changes to the DbStore.
An application can open any number of sessions to any number of
repositories. But there is a restriction on the associated ResourceSets:
Each ResourceSet can only contain one CDOView per repository. The reason
is that for each object the handling view is determined through the URI
and that contains the repository UUID. Therefore we can not support two
or more views per repository.
I must admit that I don't understand what you're trying to achieve with
your multi-repository setup...
Cheers
/Eike
----
http://thegordian.blogspot.com