[CDO] managing model changes [message #114941] |
Mon, 17 March 2008 12:36  |
Eclipse User |
|
|
|
Originally posted by: leha_by.mail.ru
Hallo Eike
I have a question about CDO concepts in managing the underlying models:
I have created an e-core model and generated native CDO classes.
Afterwards I registered it on CDO server and filled it with data. After
some time my model has changed (I add some classes and changed some old
ones). After trying to work with my old data I got error:
java.lang.IllegalStateException: range.getCount() != metaIDRange.getCount()
at
org.eclipse.emf.internal.cdo.CDOSessionImpl.registerEPackage (CDOSessionImpl.java:429)
at
org.eclipse.emf.internal.cdo.CDOPackageRegistryImpl$CDOPacka geDescriptor.getEPackage(CDOPackageRegistryImpl.java:119)
at
org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:114)
at
org.eclipse.emf.internal.cdo.CDOSessionPackageManagerImpl.re solve(CDOSessionPackageManagerImpl.java:110)
at
org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl.r esolve(CDOPackageImpl.java:330)
at
org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl.l ookupClass(CDOPackageImpl.java:219)
at
org.eclipse.emf.cdo.internal.protocol.model.CDOClassRefImpl. resolve(CDOClassRefImpl.java:75)
at
org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionIm pl. <init>(CDORevisionImpl.java:113)
at
org.eclipse.emf.cdo.protocol.revision.CDORevisionUtil.read(C DORevisionUtil.java:48)
at
org.eclipse.emf.internal.cdo.protocol.LoadRevisionRequest.co nfirming(LoadRevisionRequest.java:128)
at
org.eclipse.emf.internal.cdo.protocol.LoadRevisionRequest.co nfirming(LoadRevisionRequest.java:1)
at
org.eclipse.net4j.signal.RequestWithConfirmation.execute(Req uestWithConfirmation.java:57)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:143)
Obviously this was a reaction on my model changes, but not quite the one I
would expect :). Now the question: What is the recommended way of dealing
with model changes (updates)? Do I have a possibility to reuse data stored
using old model with my new model?
And one more question: What is the experience with running CDO in
production environment with high load? What are the examples of
applications where CDO is used in production mode that you know about?
Regards,
Alexej Spas
|
|
|
Re: [CDO] managing model changes [message #114996 is a reply to message #114941] |
Mon, 17 March 2008 14:24  |
Eclipse User |
|
|
|
Originally posted by: stepper.sympedia.de
Hi Alexej,
Actually you should never change a model once you registered it under a certain URI with the repository. I recommend that you register the new model (version) under a new URI (typically with an increased version number). Then you need to migrate the instances of "old" classes to new instances of the new classes. There's no support in CDO or even EMF to help you with this process.
The exception you got is just a simple check that the model has the same size as the one you registered before under that same URI..
Cheers
/Eike
Alexej Spas schrieb:
> Hallo Eike
>
> I have a question about CDO concepts in managing the underlying models:
> I have created an e-core model and generated native CDO classes.
> Afterwards I registered it on CDO server and filled it with data. After
> some time my model has changed (I add some classes and changed some old
> ones). After trying to work with my old data I got error:
> java.lang.IllegalStateException: range.getCount() != metaIDRange.getCount()
> at
> org.eclipse.emf.internal.cdo.CDOSessionImpl.registerEPackage (CDOSessionImpl.java:429)
>
> at
> org.eclipse.emf.internal.cdo.CDOPackageRegistryImpl$CDOPacka geDescriptor.getEPackage(CDOPackageRegistryImpl.java:119)
>
> at
> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:114)
>
> at
> org.eclipse.emf.internal.cdo.CDOSessionPackageManagerImpl.re solve(CDOSessionPackageManagerImpl.java:110)
>
> at
> org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl.r esolve(CDOPackageImpl.java:330)
>
> at
> org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl.l ookupClass(CDOPackageImpl.java:219)
>
> at
> org.eclipse.emf.cdo.internal.protocol.model.CDOClassRefImpl. resolve(CDOClassRefImpl.java:75)
>
> at
> org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionIm pl. <init>(CDORevisionImpl.java:113)
>
> at
> org.eclipse.emf.cdo.protocol.revision.CDORevisionUtil.read(C DORevisionUtil.java:48)
>
> at
> org.eclipse.emf.internal.cdo.protocol.LoadRevisionRequest.co nfirming(LoadRevisionRequest.java:128)
>
> at
> org.eclipse.emf.internal.cdo.protocol.LoadRevisionRequest.co nfirming(LoadRevisionRequest.java:1)
>
> at
> org.eclipse.net4j.signal.RequestWithConfirmation.execute(Req uestWithConfirmation.java:57)
>
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:143)
>
>
> Obviously this was a reaction on my model changes, but not quite the one
> I would expect :). Now the question: What is the recommended way of
> dealing with model changes (updates)? Do I have a possibility to reuse
> data stored using old model with my new model?
> And one more question: What is the experience with running CDO in
> production environment with high load? What are the examples of
> applications where CDO is used in production mode that you know about?
>
> Regards, Alexej Spas
>
>
|
|
|
Re: [CDO] managing model changes [message #615919 is a reply to message #114941] |
Mon, 17 March 2008 14:24  |
Eclipse User |
|
|
|
Hi Alexej,
Actually you should never change a model once you registered it under a certain URI with the repository. I recommend that you register the new model (version) under a new URI (typically with an increased version number). Then you need to migrate the instances of "old" classes to new instances of the new classes. There's no support in CDO or even EMF to help you with this process.
The exception you got is just a simple check that the model has the same size as the one you registered before under that same URI..
Cheers
/Eike
Alexej Spas schrieb:
> Hallo Eike
>
> I have a question about CDO concepts in managing the underlying models:
> I have created an e-core model and generated native CDO classes.
> Afterwards I registered it on CDO server and filled it with data. After
> some time my model has changed (I add some classes and changed some old
> ones). After trying to work with my old data I got error:
> java.lang.IllegalStateException: range.getCount() != metaIDRange.getCount()
> at
> org.eclipse.emf.internal.cdo.CDOSessionImpl.registerEPackage (CDOSessionImpl.java:429)
>
> at
> org.eclipse.emf.internal.cdo.CDOPackageRegistryImpl$CDOPacka geDescriptor.getEPackage(CDOPackageRegistryImpl.java:119)
>
> at
> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:114)
>
> at
> org.eclipse.emf.internal.cdo.CDOSessionPackageManagerImpl.re solve(CDOSessionPackageManagerImpl.java:110)
>
> at
> org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl.r esolve(CDOPackageImpl.java:330)
>
> at
> org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl.l ookupClass(CDOPackageImpl.java:219)
>
> at
> org.eclipse.emf.cdo.internal.protocol.model.CDOClassRefImpl. resolve(CDOClassRefImpl.java:75)
>
> at
> org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionIm pl. <init>(CDORevisionImpl.java:113)
>
> at
> org.eclipse.emf.cdo.protocol.revision.CDORevisionUtil.read(C DORevisionUtil.java:48)
>
> at
> org.eclipse.emf.internal.cdo.protocol.LoadRevisionRequest.co nfirming(LoadRevisionRequest.java:128)
>
> at
> org.eclipse.emf.internal.cdo.protocol.LoadRevisionRequest.co nfirming(LoadRevisionRequest.java:1)
>
> at
> org.eclipse.net4j.signal.RequestWithConfirmation.execute(Req uestWithConfirmation.java:57)
>
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:143)
>
>
> Obviously this was a reaction on my model changes, but not quite the one
> I would expect :). Now the question: What is the recommended way of
> dealing with model changes (updates)? Do I have a possibility to reuse
> data stored using old model with my new model?
> And one more question: What is the experience with running CDO in
> production environment with high load? What are the examples of
> applications where CDO is used in production mode that you know about?
>
> Regards, Alexej Spas
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03041 seconds