Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 7699 invoked from network); 9 Dec 2009 09:26:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Dec 2009 09:26:44 -0000 Received: (qmail 58693 invoked by uid 500); 9 Dec 2009 09:26:44 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 58599 invoked by uid 500); 9 Dec 2009 09:26:43 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 58591 invoked by uid 99); 9 Dec 2009 09:26:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 09:26:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 09:26:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ADCB229A0016 for ; Wed, 9 Dec 2009 01:26:20 -0800 (PST) Message-ID: <1209854136.1260350780709.JavaMail.jira@brutus> Date: Wed, 9 Dec 2009 09:26:20 +0000 (UTC) From: "Luiz Fernando Teston (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Created: (JCR-2428) When adding nodes inside a given node on different sessions distributed on different threads is throws InvalidItemStateException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org When adding nodes inside a given node on different sessions distributed on different threads is throws InvalidItemStateException -------------------------------------------------------------------------------------------------------------------------------- Key: JCR-2428 URL: https://issues.apache.org/jira/browse/JCR-2428 Project: Jackrabbit Content Repository Issue Type: Bug Components: jackrabbit-core Affects Versions: 1.6.0 Environment: Mac OS X 10.6 with JDK 1.5 (yes, I downgraded this) Reporter: Luiz Fernando Teston I just found an strange behavior while using multiple sessions on multi thread environment. I'd like to know if I did something wrong. My application code do this: 1 - before start to work, it creates a root node inside a new session. It saves and close this session. 2 - create a bunch of workers. Each worker has its own session. 3 - each worker adds nodes inside the root node retrieved by its session. It saves and do a logout properly. 4 - fill this workers on a list of Callables to be passed to an java 5 ThreadPoolExecutor. 5 - it executes all workers on the ThreadPool. 6 - it do some asserts to verify if it gots some errors or not. During phase 5 it gots an exception telling this: javax.jcr.InvalidItemStateException: Item cannot be saved because it has been modified externally: node / at org.apache.jackrabbit.core.ItemImpl.getTransientStates(ItemImpl.java:245) at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:939) at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:915) I just wrote a test to simulate this behavior. Sometimes it got this error sometimes not. Also to be easy to simulate this error, just change the THREAD_SIZE and NODE_SIZE variables. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.