Dan Diephouse wrote:
Stefan Guggisberg wrote: Actually, I did some more debugging and its looking like they're both trying to add a child to an existing parent node at the same time. I'm logging messages like this at the same time: Thread #1: Created node /parent/child with id 122b0a4f-ba59-4565-bad8-2be9a3af97ae and parent b3c8126e-8c84-4735-b3b6-a0b24708beeb Thread #2: Created node /parent/child with id 7e443962-f1f6-4c2d-9d8c-0d05a3e7d8e8 and parent b3c8126e-8c84-4735-b3b6-a0b24708beeb And *always* one of the threads will fail will this when I call session.save(): Exception in thread "pool-1-thread-1" org.springframework.dao.ConcurrencyFailureException: Invalid item state; nested exception is javax.jcr.InvalidItemStateException: 8e7e280d-c8ff-429e-bb69-a022885b5d61 has been modified externally Caused by: javax.jcr.InvalidItemStateException: 8e7e280d-c8ff-429e-bb69-a022885b5d61 has been modified externally at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1218) at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:849) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springmodules.jcr.JcrTemplate$LogoutSuppressingInvocationHandler.invoke(JcrTemplate.java:712) at $Proxy2.save(Unknown Source) I did a bit of cleanup so I can actually produce this reliably. Any further ideas? It seems like this type of things should work... - Dan -- Dan Diephouse MuleSource http://mulesource.com | http://netzooid.com/blog |
- Problem in Multithreaded Environment Dan Diephouse
- Re: Problem in Multithreaded Environment Dan Diephouse
- Re: Problem in Multithreaded Environment Stefan Ivanov
- Re: Problem in Multithreaded Environment Stefan Guggisberg
- Re: Problem in Multithreaded Environment Dan Diephouse
- Re: Problem in Multithreaded Environmen... Dan Diephouse
- Re: Problem in Multithreaded Envir... Stefan Guggisberg
- Re: Problem in Multithreaded E... Dan Diephouse
- Re: Problem in Multithread... Jukka Zitting
- Re: Problem in Multithread... Dan Diephouse
- Re: Problem in Multithread... Jukka Zitting
- RE: Problem in Multithreaded Environment Connor Brett
- Re: Problem in Multithreaded Environment Dominique Pfister
