Bug 297967 - Provide a CDOTransaction that temporarily commits to local storage (aka Push Mode)
Summary: Provide a CDOTransaction that temporarily commits to local storage (aka Push ...
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 3.0   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eike Stepper CLA Friend
QA Contact: Eike Stepper CLA Friend
URL:
Whiteboard:
Keywords:
Depends on: 298334
Blocks: 298568
  Show dependency tree
 
Reported: 2009-12-16 10:10 EST by Eike Stepper CLA Friend
Modified: 2010-06-29 09:22 EDT (History)
3 users (show)

See Also:
stepper: documentation+


Attachments
Patch v1 - just a temp save (21.51 KB, patch)
2009-12-17 07:02 EST, Eike Stepper CLA Friend
no flags Details | Diff
Patch v2 - initial tests passing (38.97 KB, patch)
2009-12-17 13:18 EST, Eike Stepper CLA Friend
no flags Details | Diff
Patch v3 (42.98 KB, patch)
2009-12-18 14:53 EST, Eike Stepper CLA Friend
no flags Details | Diff
Patch v4 - depends on patch in bug 298334 (15.84 KB, patch)
2009-12-21 13:58 EST, Eike Stepper CLA Friend
no flags Details | Diff
A test case for the push transaction (8.63 KB, patch)
2009-12-28 11:30 EST, Gonzague Reydet CLA Friend
stepper: iplog+
Details | Diff
Some other tests for the addition of new objects in a push transaction (8.84 KB, patch)
2009-12-28 11:44 EST, Gonzague Reydet CLA Friend
stepper: iplog+
Details | Diff
Some other test cases regarding objects removal (5.54 KB, patch)
2009-12-28 12:06 EST, Gonzague Reydet CLA Friend
stepper: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eike Stepper CLA Friend 2009-12-16 10:10:59 EST
- Add exportChanges(OutputStream) and importChanges(InputStream) to CDOTransaction.
- Provide a CDOFileSystemTransaction that redefines the commit() semantics to use exportChanges()
- Add push() to CDOFileSystemTransaction.
Comment 1 Eike Stepper CLA Friend 2009-12-17 07:02:13 EST
Created attachment 154649 [details]
Patch v1 - just a temp save
Comment 2 Eike Stepper CLA Friend 2009-12-17 13:18:25 EST
Created attachment 154683 [details]
Patch v2 - initial tests passing

Open issues:
- CDOPushSavepoint
- rollback()
Comment 3 Eike Stepper CLA Friend 2009-12-18 14:53:54 EST
Created attachment 154813 [details]
Patch v3

I added CDOResource.OPTION_SAVE_OVERRIDE_TRANSACTION. Used by CDOEditor.
Comment 4 Eike Stepper CLA Friend 2009-12-21 13:58:51 EST
Created attachment 154894 [details]
Patch v4 - depends on patch in bug 298334
Comment 5 Eike Stepper CLA Friend 2009-12-28 05:28:02 EST
Committed to HEAD
Comment 6 Gonzague Reydet CLA Friend 2009-12-28 11:30:38 EST
Created attachment 155093 [details]
A test case for the push transaction

I confirm that I'm the only author and I apply the EPL.
Comment 7 Eike Stepper CLA Friend 2009-12-28 11:36:55 EST
Committed test case to HEAD
Comment 8 Gonzague Reydet CLA Friend 2009-12-28 11:44:29 EST
Created attachment 155094 [details]
Some other tests for the addition of new objects in a push transaction

I confirm that I'm the only author and I apply the EPL.
Comment 9 Eike Stepper CLA Friend 2009-12-28 11:52:05 EST
Committed to HEAD
Comment 10 Gonzague Reydet CLA Friend 2009-12-28 12:06:44 EST
Created attachment 155095 [details]
Some other test cases regarding objects removal

I confirm that I'm the only author and I apply the EPL.
Comment 11 Eike Stepper CLA Friend 2009-12-28 12:17:57 EST
Committed to HEAD
Comment 12 Eike Stepper CLA Friend 2010-05-08 04:55:46 EDT
Example:

    File file = new File("changes.bin");
    file.delete();

    // Open a new transaction and wrap it in a push transaction
    CDOPushTransaction transaction1 = new CDOPushTransaction(session.openTransaction(), file);

    // Commit to local file
    transaction1.commit();
    transaction1.close();

    // Open a new push transaction and load changes from local file
    CDOPushTransaction transaction2 = new CDOPushTransaction(session.openTransaction(), file);

    // Push changes to the repository
    transaction2.push();
    transaction2.close();
Comment 13 Eike Stepper CLA Friend 2010-06-29 04:40:16 EDT
Available in 3.0 GA:
http://download.eclipse.org/modeling/emf/cdo/updates/3.0-releases/