CDO and ConcurrentModificationException [message #593632] |
Wed, 04 October 2006 15:28 |
Eclipse User |
|
|
|
Originally posted by: yannick.lizzi.silogic.fr
Hi all,
I get a ConcurrentModificationException when saving a resource after
getting and modifing its content, and I don't understand why...
I reproduced the error by modifying the CDO example project:
In project cdo.examples.ui -->
cdo.examples.ui.internal.actions.LoadResourceAction, I modify as follow:
....
private void loadResource() throws Exception {
.... // create resource manager
.... // load content of resource1
// Populate the model from the second resource.
System.out.println("--> TEST: Populate the model from the second resource");
Library library2 = (Library)resource2.getContents().get(0);
Book book = (Book)library2.getBooks().get(0);
book.setTitle("hello"); // my modif: try to update the book title
....
resourceManager.commit(); // commit modification
resourceManager.stop();
----
Once the library resources have been created, I invoke the Load library
resources to run my updates and the error happens when commit is invoked.
I get the same error if I update the book title after recreating a new
resource manager with a new resource set (just after the
resourceManager.stop()).
First, I would like to understand why ;), and also what are the
differences between this way of modifying the model and the way showed
in the example (that is via the cdo editor).
Thanks
Yannick
|
|
|
Powered by
FUDForum. Page generated in 0.02953 seconds