Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335004 - Add commit check to prevent usage of duplicate dynamic packages
Summary: Add commit check to prevent usage of duplicate dynamic packages
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Egidijus Vaisnora CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-21 07:36 EST by Egidijus Vaisnora CLA
Modified: 2011-06-23 03:42 EDT (History)
2 users (show)

See Also:
stepper: review+


Attachments
Patch v1 - along with test case (5.47 KB, patch)
2011-01-28 04:24 EST, Egidijus Vaisnora CLA
no flags Details | Diff
Patch v2 - adjusted to head (5.97 KB, patch)
2011-01-31 07:18 EST, Egidijus Vaisnora CLA
vaisegid: review+
Details | Diff
Patch v3 - ready to be committed (6.45 KB, patch)
2011-02-03 06:48 EST, Eike Stepper CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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