Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 55149 invoked from network); 4 Apr 2005 08:19:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Apr 2005 08:19:13 -0000 Received: (qmail 43081 invoked by uid 500); 4 Apr 2005 08:19:01 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 42976 invoked by uid 500); 4 Apr 2005 08:19:00 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 42917 invoked by uid 99); 4 Apr 2005 08:19:00 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from portail2.utbm.fr (HELO portail1.utbm.fr) (193.48.246.11) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 04 Apr 2005 01:18:57 -0700 Received: from portail2.utbm.fr (localhost.localdomain [127.0.0.1]) by portail1.utbm.fr (8.12.8/jtpda-5.4) with ESMTP id j348Iof3023327 for ; Mon, 4 Apr 2005 10:18:50 +0200 Received: from vers-webmail.utbm.fr (vers-webmail.utbm.fr [192.168.1.28]) by portail2.utbm.fr (8.12.8/8.12.8) with ESMTP id j348Inve023319 for ; Mon, 4 Apr 2005 10:18:50 +0200 Received: by vers-webmail.utbm.fr (Postfix, from userid 48) id C3C949F30; Mon, 4 Apr 2005 10:18:48 +0200 (CEST) Received: from 195.6.25.118 ([195.6.25.118]) by webmail2.utbm.fr (IMP) with HTTP for ; Mon, 4 Apr 2005 10:18:48 +0200 Message-ID: <1112602728.4250f868b4df0@webmail2.utbm.fr> Date: Mon, 4 Apr 2005 10:18:48 +0200 From: "Melanie.Bats@UTBM.fr" To: Jakarta Commons Users List Subject: Re: [transaction.locking] Modify the behaviour of the ReadWriteUpgradeLockManager References: <1112272464.424bee5064667@webmail2.utbm.fr> <9da4f45205033111561a7d0e95@mail.gmail.com> <1112340709.424cf8e54582c@webmail2.utbm.fr> <9da4f4520504010830b49d1e0@mail.gmail.com> <9da4f45205040120245b55136d@mail.gmail.com> In-Reply-To: <9da4f45205040120245b55136d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.4 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, Selon Oliver Zeigermann : > If so that's exactly what the read/write lock and then the read/write > lock manager does. Thanks this seems to be what I need. Mel > On Apr 1, 2005 6:30 PM, Oliver Zeigermann > wrote: > > Still not quite clear, most likely because I am a bit dumb ;) What is > > the use of your kind of upgrade lock? Or is it that you want > > preference of the write lock over read locks, i.e. when more than one > > party is waiting for a lock, the one waiting for the write lock gets > > preference? > > > > Oliver > > > > > > On Apr 1, 2005 9:31 AM, Melanie.Bats@UTBM.fr wrote: > > > Hi, > > > > > > Selon Oliver Zeigermann : > > > > Hmmm, not quite sure that I get this all right, but to me it seems you > > > > describe the simple read/write locks (without the upgrade step). Is > > > > that possible? If so you could simply use the ReadWriteLockManager. > > > > > > My lock manager has not exactly the same behaviour as the > ReadWriteLockManager > > > and I think looks more like the ReadWriteUpgardeLockManager. > > > > > > I will try to explain what I want to do ;o) > > > > > > In my case : > > > * Read access requires a shared lock (S). > > > * Write access requires an exclusive lock (X). > > > * An upgrade lock (U) supports read with (potential) write access and > prevents > > > further shared locks (S) for the same object. An upgrade lock (U) can be > > > converted to an exclusive lock (X) after the release of the existing > shared > > > locks or back to a shared lock if no update action is needed (time out). > > > > > > So, the difference is when I have an upgrade lock on a data, it is > impossible to > > > obtain shared locks, but locks that are already granted keep going on. > With the > > > exclusive lock no other locks can be obtained or exist on the same data. > > > > > > I expect it's more clear? > > > > > > Is it possible to transform the ReadWriteUpgradeLockManager to obtain > this ? > > > > > > Thanks for your help, > > > > > > Mel > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org