jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Adding nodes at the same time in two different sessions
Date Fri, 03 Nov 2006 13:32:41 GMT
hi marcin,

this has been discussed before, see e.g.
http://www.nabble.com/Concurrent-writing-to-a-JCR-repository-tf2363097.html#a6588868

there's also a jira issue that proposes an improvement wrt concurrent
modifications
of the same node:
http://issues.apache.org/jira/browse/JCR-584

cheers
stefan

On 11/3/06, Marcin Nowak <marcin.j.nowak@comarch.com> wrote:
> Hi,
>
> When adding nodes to the repository in two simultaneously threads and
> sessions at the same time I get this:
>
> javax.jcr.InvalidItemStateException: /: the item cannot be saved because it
> has been modified externally.
>         at
> org.apache.jackrabbit.rmi.server.ServerObject.getRepositoryException(ServerO
> bject.java:104)
>         at
> org.apache.jackrabbit.rmi.server.ServerSession.save(ServerSession.java:213)
>         at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
>         at sun.rmi.transport.Transport$1.run(Unknown Source)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at sun.rmi.transport.Transport.serviceCall(Unknown Source)
>         at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
>         at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
>         at
> sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown
> Source)
>         at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
>         at sun.rmi.server.UnicastRef.invoke(Unknown Source)
>         at org.apache.jackrabbit.rmi.server.ServerSession_Stub.save(Unknown
> Source)
>         at
> org.apache.jackrabbit.rmi.client.ClientSession.save(ClientSession.java:207)
>
> nodes are referencable but not versionable - test involved adding 20 nodes
> in two sessions(10 nodes in one session) each in another thread at the same
> time to an empty repository, first we've created parent node ('a' in session
> one and 'b' in session two) and than we've putted there 10 nodes with
> different names (10 to node 'a' for session one and another 10 to node 'b'
> for session two) and it generates exception.
>
> BR,
> Marcin Nowak
>
>
> --
> Empowering business
> http://webinars.comarch.com
>

Mime
View raw message