| Summary: | Make it possible to preregister epackages | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Martin Taal <mtaal> | ||||||||||||||
| Component: | cdo.core | Assignee: | Eike Stepper <stepper> | ||||||||||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||||||||||
| Severity: | enhancement | ||||||||||||||||
| Priority: | P3 | CC: | caspar_d, pawel, saulius.tvarijonas, stepper, vaisegid | ||||||||||||||
| Version: | 4.3 | ||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||
| Hardware: | All | ||||||||||||||||
| OS: | All | ||||||||||||||||
| Whiteboard: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Martin Taal
We facing similar problem also and thinking about creating tables upfront. Committed revision 7712: - trunk/features/org.eclipse.emf.cdo.server.product-feature - trunk/plugins/org.eclipse.emf.cdo.server I've added this new API:
IRepository.setInitialPackages(EPackage...)
cdo-server.xml supports the following new syntax:
<repository name="repo1">
<initialPackage nsURI="http://www.eclipse.org/emf/CDO/examples/company/1.0.0"/>
<initialPackage nsURI="http://xyz"/>
...
Thanks Eike, I tested this and it works great! My tables now get created when the app starts for the first time. gr. Martin Hi Eike, It would be helpful to have API to register packages after activation also. We have few packages which takes about 10 minutes to create tables. Packages are optional and we could invoke registration after repository activation. Is it possible to adjust API? It's not so much an API question. The problem with not-first-start-registrations is that there's no "system" commit like the commit of the root resource during first time repo activation. Reopening for the attempt to allow pre-registration on non-first repository starts, as well... Created attachment 195947 [details]
Patch for non-first start pre-registration
Egidijus, can you please test this?
Moving all open enhancement requests to 4.1 I thought this fix had already been committed. Seesms that not. Egidijus, I'm not sure why I asked you to test this. Do you know it? Have you tested it? No, I have not tested it yet... Will try to check this asap Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master. Created attachment 230217 [details]
Patch for non-first start packages changed to apply to HEAD
Created attachment 230218 [details]
Test case for non-system package registration
Created attachment 230219 [details]
Updated test case
Created attachment 230220 [details]
Updated patch
I have switched the order of readPackageUnits() and initSystemPackages(false) calls to populate the package registry first before attempting to write to it; this prevents potential primary key violations when registering initial packages which are already present in the repository.
Created attachment 230221 [details]
Updated patch (2)
Hi Andras, Unfortunately your change of the initSystemPackages() method breaks the 4.x API and we can't accept that for 4.2 ;-( You must find a different solution... Moving all outstanding enhancements to 4.3 It took me more than an hour to apply this patch against the old base commit to avoid conflicts. Thank you EGit! commit 47e034b851573650dc67602f4902a9f5ef978edf Sorry, I had to rewrite that commit because you're not a registered Gerrit author ;-( commit ccd53285217afb0f3cfdbfea336b82e9ffc1daae Closing. Closing. |