Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 99072 invoked from network); 3 Nov 2003 11:16:03 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 3 Nov 2003 11:16:03 -0000 Received: (qmail 16249 invoked by uid 500); 3 Nov 2003 11:15:17 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 16000 invoked by uid 500); 3 Nov 2003 11:15:15 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 15984 invoked from network); 3 Nov 2003 11:15:15 -0000 Received: from unknown (HELO hotmail.com) (64.4.18.198) by daedalus.apache.org with SMTP; 3 Nov 2003 11:15:15 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 3 Nov 2003 03:15:29 -0800 Received: from 61.11.83.250 by law12-oe63.law12.hotmail.com with DAV; Mon, 03 Nov 2003 11:15:29 +0000 X-Originating-IP: [61.11.83.250] X-Originating-Email: [antonypaul24@hotmail.com] From: "Antony Paul" To: "Tomcat Users List" References: <008901c3a1d6$61c883b0$fabafea9@messianic.dyndns.org> <3FA62327.FA7F99B5@hager.fr> Subject: Re: Design advice needed. Date: Mon, 3 Nov 2003 16:52:26 +0530 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4927.1200 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Message-ID: X-OriginalArrivalTime: 03 Nov 2003 11:15:29.0829 (UTC) FILETIME=[CA3BDD50:01C3A1FB] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N But this requires adding a column to every table. I found two ways of doing this. 1. Using time stamp. It requires adding a column to table. 2. Checking data for equality before updating. It requires querying database again. Any alternative way. thanks for the replies Antony Paul ----- Original Message ----- From: "Jean-Louis" To: "Tomcat Users List" Sent: Monday, November 03, 2003 3:13 PM Subject: Re: Design advice needed. > Hi, > > you can use a timestamp and write for example : > update ... > where ... > and timestamp = 'the timestamp read by the select statement and saved in your application' > > And then check the number of rows updated. > > Antony Paul a �crit : > > > Can u pls mention what is that Oracle feature ?. Reading the data again is > > time consuming. > > ----- Original Message ----- > > From: "Johan Kok" > > To: "'Tomcat Users List'" > > Sent: Monday, November 03, 2003 12:17 PM > > Subject: RE: Design advice needed. > > > > > Anthony, > > > > > > Did you consider reading the record without locks, and when an updated are > > > made, to take a write-lock, check that the original record are still the > > > same and then apply, otherwise fail. > > > > > > Your intentions might not work unless all writes are passed through the > > > container, as Oracle will not have any control, until a write occurs, i.e. > > > you will have to open with read only, and only take out a lock when you > > are > > > going to write, as described above. for safety sake your container will > > have > > > to re-read the data in any case, before commiting, otherwise it may update > > > changed data, e.g. updates that are made through other processes or even > > > triggers. > > > > > > If my memory serves me right, that is something you can do easily with > > > Oracle (i.e. there's a standard feature implemented), even with Oracle > > 6/7. > > Jean-Louis CLAUSS > > > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org