Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 41948 invoked from network); 8 Sep 2008 19:34:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Sep 2008 19:34:09 -0000 Received: (qmail 50213 invoked by uid 500); 8 Sep 2008 19:34:06 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 49793 invoked by uid 500); 8 Sep 2008 19:34:05 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 49782 invoked by uid 99); 8 Sep 2008 19:34:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 12:34:05 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 19:33:06 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KcmUT-0006nW-ID for derby-user@db.apache.org; Mon, 08 Sep 2008 12:33:37 -0700 Message-ID: <19379460.post@talk.nabble.com> Date: Mon, 8 Sep 2008 12:33:37 -0700 (PDT) From: derbyfan195 To: derby-user@db.apache.org Subject: Does using DerbyDB require synchronization? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: huang195@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org Just started using Derby in my Java code and realized some weird synchronization issues. I have multiple threads accessing the same Derby Database (embedded one) through a single connection. They issue read-only queries, i.e., select, each with its own statement, and does some operations on the returned ResultSet using ResultSet.next() operation. However, I noticed sometimes, one of these next() calls would fail and gave me an error of next() is not permitted, make sure that AUTO_COMMIT is turned OFF. I don't know what this error means or why I need to turn AUTO_COMMIT off. Do I need any synchronization among the statement objects obtained from the same connection object? Any help would be appreciated. - Hai -- View this message in context: http://www.nabble.com/Does-using-DerbyDB-require-synchronization--tp19379460p19379460.html Sent from the Apache Derby Users mailing list archive at Nabble.com.