Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336806

Summary: Enhance CDO Offline example
Product: [Modeling] EMF Reporter: Martin Fluegge <martin.fluegge>
Component: cdo.coreAssignee: Martin Fluegge <martin.fluegge>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 CC: lu.xingxiao
Version: 4.2Flags: stepper: review+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: Appealing to a Broader Community
Bug Depends on: 346792    
Bug Blocks:    
Attachments:
Description Flags
patch v1
none
Patch v2
none
Patch v3
none
Patch v4 none

Description Martin Fluegge CLA 2011-02-10 07:26:19 EST
The purpose for this request is to enhance the existing offline example. Currently the examples is written in one file containing different inner classes. This setup should be more separated as a base for an user interface which is connected to this example.
Comment 1 Martin Fluegge CLA 2011-02-10 07:33:29 EST
Created attachment 188678 [details]
patch v1

I attached a patch which splits up the iniital file. I also wrote an offline merge example which should be integrated into the separated implementation. Unfortunately I can't get the clone running. After startup it runs into a Oflline/Syncing loop which makes me feel that there is something wrong with the connection to the master or with the repository synchronizer. 

The problem is that I can't even get the original example running, so this might be a new common problem in the offline mode. (three days ago it worked)

Eike, could you please try the examples and tell me whether they work on your machine?
Comment 2 Eike Stepper CLA 2011-02-10 08:49:39 EST
(In reply to comment #1)
> I attached a patch which splits up the iniital file. I also wrote an offline
> merge example which should be integrated into the separated implementation.
> Unfortunately I can't get the clone running. After startup it runs into a
> Oflline/Syncing loop which makes me feel that there is something wrong with the
> connection to the master or with the repository synchronizer. 

With the new LongIDHandler I introduced a bug. An OMMonitor was forked() twice and complained about missing begin() on the second call. I fixed it.

It seeme that there's one more problem with ExternalReferenceManager.rawImport(). Investigating...
Comment 3 Eike Stepper CLA 2011-02-11 01:37:16 EST
> It seeme that there's one more problem with
> ExternalReferenceManager.rawImport(). Investigating...

I fixed replication of extRef data!
Comment 4 Martin Fluegge CLA 2011-02-14 04:12:59 EST
Created attachment 188876 [details]
Patch v2

Now it works ;)

I enhanced it a bit and included merging the the client site.
Run the client with "-automerge" will start the session listener wit an automatic merge functionality after the master is only again. The changes will be merged, committed and the clone switches back to the main branch. :)
Comment 5 Eike Stepper CLA 2011-02-22 06:37:09 EST
Patch v1 has not been obsoleted and patch v2 is not workspace-relative ;-(
Comment 6 Martin Fluegge CLA 2011-02-22 06:41:40 EST
Darn. I'll fix this asap. Sorry.
Comment 7 Eike Stepper CLA 2011-02-22 06:45:21 EST
Did it already!
Comment 8 Eike Stepper CLA 2011-02-22 06:45:48 EST
Can OfflineExampleMaster.showMenu() be removed? It's never called...
Comment 9 Eike Stepper CLA 2011-02-22 06:47:00 EST
Created attachment 189475 [details]
Patch v3

Is this expected to replace the original OfflineExample?
Comment 10 Martin Fluegge CLA 2011-02-22 07:24:39 EST
> Can OfflineExampleMaster.showMenu() be removed? It's never called...

Yepp.

>Is this expected to replace the original OfflineExample?

Yepp.
Comment 11 Martin Fluegge CLA 2011-02-22 13:22:33 EST
Committed revision 7174
Comment 12 Martin Fluegge CLA 2011-02-22 13:23:00 EST
Shall I remove the old example?
Comment 13 Martin Fluegge CLA 2011-02-22 15:16:35 EST
We need to provide a small menus which shows all available switched for the client (e.g. enableMerging) and we should store the current branch of the clone the make it resistant against clone restarts.
Comment 14 Martin Fluegge CLA 2011-05-21 13:08:41 EDT
Created attachment 196272 [details]
Patch v4

I added a small menu for the client which describes the possible configurations. But due to bug 346792 I had to stop working on this ;(
Comment 15 Eike Stepper CLA 2011-06-08 04:23:12 EDT
(In reply to comment #12)
> Shall I remove the old example?

I'll do it now ;-)
Comment 16 Eike Stepper CLA 2011-06-08 04:25:58 EDT
Committed revision 7961
Comment 17 Eike Stepper CLA 2011-06-23 03:57:45 EDT
Moving all open enhancement requests to 4.1
Comment 18 Eike Stepper CLA 2012-08-14 22:51:38 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 19 Eike Stepper CLA 2012-12-30 10:26:45 EST
Patch v4 hasn't been committed but the original problem has been solved.
Comment 20 Eike Stepper CLA 2013-06-27 03:31:18 EDT
Available in R20130613-1157 (4.2)