|
Re: [CDO] CDO Workspace. On commit 'Change set is outdated' [message #893963 is a reply to message #893883] |
Fri, 06 July 2012 08:31 |
|
Hi Per,
I've already started to investigate this. It looks like a small bug in CDOTransactionImpl.applyChangedObjects() that
affects committing (checkin) the remote transaction. Please submit a bugzilla so that we can track the progress.
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 05.07.2012 21:38, schrieb Per Sterner:
> Hello,
>
> I am using the CDO Workspace feature and I get the message 'Change set is outdated'.
>
> 1. checkout
> 2. workspace.openTransaction. Add items. transaction.commit
> 3. workspace.openTransaction. Add items. transaction.commit
> 4. workspace.commit
> 5. workspace.openTransaction. Add items. transaction.commit
> 6. workspace.commit
>
> At the point '6.' I get the message 'Change set is outdated'.
>
> I have tried a 'workspace.update' after '4.' but it did not change the result. Am I missing something?
> Regards,
> Per Sterner
>
> Here the code:
>
>
> File: org.eclipse.emf.cdo.tests.WorkspaceTest.java
>
> public void testCheckinAfterAddExt() throws Exception
> {
> InternalCDOWorkspace workspace = checkout("MAIN", CDOBranchPoint.UNSPECIFIED_DATE);
> IOUtil.ERR().println("Checkout done");
>
> int i;
> CDOResource resource;
> CDOCommitInfo info;
>
> CDOTransaction transaction = workspace.openTransaction();
> resource = transaction.getResource(getResourcePath(RESOURCE));
> for (i = 0; i < PRODUCTS; i++)
> {
> resource.getContents().add(createProduct(i));
> }
>
> transaction.commit();
> transaction.close();
> transaction = workspace.openTransaction();
> resource = transaction.getResource(getResourcePath(RESOURCE));
> for (i = 0; i < PRODUCTS; i++)
> {
> resource.getContents().add(createProduct(i));
> }
>
> transaction.commit();
> transaction.close();
> info = workspace.checkin();
>
> // workspace.update(null);
>
> transaction = workspace.openTransaction();
> resource = transaction.getResource(getResourcePath(RESOURCE));
> for (i = 0; i < PRODUCTS; i++)
> {
> resource.getContents().add(createProduct(i));
> }
>
> transaction.commit();
> transaction.close();
>
> info = workspace.checkin();
> }
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Powered by
FUDForum. Page generated in 0.03543 seconds