Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 78660 invoked from network); 29 Aug 2005 10:21:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Aug 2005 10:21:31 -0000 Received: (qmail 25966 invoked by uid 500); 29 Aug 2005 10:21:27 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 25938 invoked by uid 500); 29 Aug 2005 10:21:27 -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 25924 invoked by uid 99); 29 Aug 2005 10:21:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2005 03:21:27 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of gcaddu-derby-user@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Aug 2005 03:21:41 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1E9gk6-0007DW-3L for derby-user@db.apache.org; Mon, 29 Aug 2005 12:19:54 +0200 Received: from so-7766-x0.essex.ac.uk ([155.245.120.189]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Aug 2005 12:19:54 +0200 Received: from karadamoglou_k by so-7766-x0.essex.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Aug 2005 12:19:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: derby-user@db.apache.org From: Kostas Karadamoglou Subject: Derby 10.1.1 - Question about transactions Date: Mon, 29 Aug 2005 11:20:51 +0100 Lines: 26 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: so-7766-x0.essex.ac.uk User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en X-Antivirus: avast! (VPS 0534-4, 26/08/2005), Outbound message X-Antivirus-Status: Clean Sender: news X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello all, I am developing an application wich uses Derby 10.1.1 The application has multiple clients/ read connections that read tables and one write conenction that write into the tables. The connection that modifies the table mostly inserts rows. There is a potential problem of a user/read connection reading data while the write connection inserts rows. This can cause read connection to execute outdated sql statements. How can I stop read connections to read data before the write connection commit the insertions. I know that there is a LOCK TABLE statement with Derby but I want to avoid it (I don't want to add string manipulation of statements). Can I use the setIsolationLevel of JDBC Connection? Which level is most appropriate? The method is defined at the Connection class. Does affect all the connections or only the one that called the method?