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

Bug 335004

Summary: Add commit check to prevent usage of duplicate dynamic packages
Product: [Modeling] EMF Reporter: Egidijus Vaisnora <vaisegid>
Component: cdo.coreAssignee: Egidijus Vaisnora <vaisegid>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: enhancement    
Priority: P3 CC: caspar_d, stepper
Version: 4.0Flags: stepper: review+
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Patch v1 - along with test case
none
Patch v2 - adjusted to head
vaisegid: review+
Patch v3 - ready to be committed none

Description Egidijus Vaisnora CLA 2011-01-21 07:36:21 EST
EPackage with the same uri must be single per system, else it corrupts data on server. 
From this comes hidden constraint that, if generated package is registered to global repository after CDOSession was opened and on server there is already registered this package, then this constraint is broken.
Comment 1 Eike Stepper CLA 2011-01-21 08:08:56 EST
Are you working on a patch?
Comment 2 Egidijus Vaisnora CLA 2011-01-21 08:18:24 EST
Yes, I think it won't affect many changes.
Comment 3 Eike Stepper CLA 2011-01-21 08:22:48 EST
Excellent. I think a good place to add the check is in CDOStateMachine.PrepareTransition directly after:

   EClass eClass = object.eClass();
Comment 4 Egidijus Vaisnora CLA 2011-01-28 04:24:07 EST
Created attachment 187816 [details]
Patch v1 - along with test case
Comment 5 Eike Stepper CLA 2011-01-29 11:26:50 EST
I'm afraid the patch is not usable anymore ;-(

Please adjust to HEAD and request the review again...
Comment 6 Egidijus Vaisnora CLA 2011-01-31 07:18:05 EST
Created attachment 187951 [details]
Patch v2 - adjusted to head
Comment 7 Eike Stepper CLA 2011-02-03 06:48:53 EST
Created attachment 188217 [details]
Patch v3 - ready to be committed
Comment 8 Egidijus Vaisnora CLA 2011-02-03 07:34:49 EST
Committed to trunk, revision 7012
Comment 9 Eike Stepper CLA 2011-06-23 03:42:31 EDT
Available in R20110608-1407