Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 6933 invoked from network); 28 Jul 2006 20:47:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jul 2006 20:47:17 -0000 Received: (qmail 40514 invoked by uid 500); 28 Jul 2006 20:47:14 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 40478 invoked by uid 500); 28 Jul 2006 20:47:14 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 40467 invoked by uid 99); 28 Jul 2006 20:47:14 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2006 13:47:14 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of oliver.zeigermann@gmail.com designates 64.233.162.203 as permitted sender) Received: from [64.233.162.203] (HELO nz-out-0102.google.com) (64.233.162.203) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2006 13:47:13 -0700 Received: by nz-out-0102.google.com with SMTP id 13so191438nzn for ; Fri, 28 Jul 2006 13:46:52 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=P2I2e9GW9fckWrdgKsjJAbj8y4pGfdMm61vU1SqDB+hWttdWOc3o4Fvh3FnD5ShkoJYktBq8btV6laGZIZPqe9GCzK90rroHWBcvBC9uOgtXGOlrrVW0nRTPBVUrk8+TYiNDWeLXJXseertRZkZT3zF6OY7yHLPiB+pU0w4oa3Q= Received: by 10.65.103.14 with SMTP id f14mr2037288qbm; Fri, 28 Jul 2006 13:46:52 -0700 (PDT) Received: by 10.35.19.19 with HTTP; Fri, 28 Jul 2006 13:46:52 -0700 (PDT) Message-ID: <9da4f4520607281346u5a569c56i6aeaa12b888b4630@mail.gmail.com> Date: Fri, 28 Jul 2006 22:46:52 +0200 From: "Oliver Zeigermann" To: dev@geronimo.apache.org Subject: Re: Pessimistic locking strategy for CMP beans in 1.1.1 In-Reply-To: <44C8BBE4.40003@hogstrom.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <44C82949.2030703@hogstrom.org> <9da4f4520607270145u4494ef1t43febd35cf69bb71@mail.gmail.com> <44C8BBE4.40003@hogstrom.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hey, again! Thanks for the detailed answers. See my comments inline. 2006/7/27, Matt Hogstrom : > > 2.) Are the requests to load the bean from the db still inside a > > transaction? > > Yes > > If so what isolation level? > > Ahhh....the 64,000 dollar question. Every RDBMs is slightly different in their implementations. > Oracle would use read-committed as would DB2 for the optimistic scenario. For pessimistic DB2 would > need to bump up to Read Stability (RS) which is the equivalent of REPEATABLE_READ. This is because > the lock duration is different for DB2 than it is for Oracle at READ_COMMITTED. So the correct > answer is it depends. So, if I understand this correctly than this is something the user has to set, right? If so don't you need another field in the bean descriptor for the isolation level of the request? Additionally, I have no big idea of DB2 isoaltion levels, but I had the impression SERIALIZABLE was the one for an optimistic scenario in Oracle - even though it does not sound like it would be. AFAIK this level does not use any blocking locks, but rahter some sort of snapshot isolation. Am I wrong? > > 3.) Is there something like caching of beans in Geronimo? If so how is > > this handled, especially in a distributed scenario? > > Currently there is a per Tx cache. I believe Gianny was working on a global cache but I don't know > the state of it. Although, the global cache is on a per G instance and not a cluster. We need to > work on that. Very interesting! Have you already inverstigated what happens when some objects in a tx come from the cache and others from the db? Also, what to do when an object changes in the db while it is used from the cache. Might happen when one cluster node writes changes to an object in the db. Is there any notification mechanism? I guess JGroups is no option because of the bad LGPL license. Are there any alternatives? Any thoughts to enlighten me? Cheers Oliver