Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 20262 invoked from network); 28 Jul 2007 12:27:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Jul 2007 12:27:42 -0000 Received: (qmail 97571 invoked by uid 500); 28 Jul 2007 12:27:42 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 97554 invoked by uid 500); 28 Jul 2007 12:27:42 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 97544 invoked by uid 99); 28 Jul 2007 12:27:42 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jul 2007 05:27:42 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jlendholt@hotmail.com designates 65.54.246.235 as permitted sender) Received: from [65.54.246.235] (HELO bay0-omc3-s35.bay0.hotmail.com) (65.54.246.235) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jul 2007 12:27:33 +0000 Received: from hotmail.com ([207.46.9.113]) by bay0-omc3-s35.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Sat, 28 Jul 2007 05:27:12 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 28 Jul 2007 05:27:11 -0700 Message-ID: Received: from 207.46.9.123 by by119fd.bay119.hotmail.msn.com with HTTP; Sat, 28 Jul 2007 12:27:07 GMT X-Originating-IP: [85.177.203.201] X-Originating-Email: [jlendholt@hotmail.com] X-Sender: jlendholt@hotmail.com In-Reply-To: From: "Jan Lendholt" To: user@cayenne.apache.org Subject: Re: Optimistic locking seems not to work Date: Sat, 28 Jul 2007 12:27:07 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-OriginalArrivalTime: 28 Jul 2007 12:27:11.0897 (UTC) FILETIME=[9F809890:01C7D112] X-Virus-Checked: Checked by ClamAV on apache.org Hi Michael, no, I did not enable the remote notifications. Neither ist Container-Managed Transactions. But Object-Validation und Use Shared Cache is enabled. Does this have any influence on my problem? Thanks, Jan >From: "Michael Gentry" >Reply-To: user@cayenne.apache.org >To: user@cayenne.apache.org >Subject: Re: Optimistic locking seems not to work >Date: Sat, 28 Jul 2007 07:44:52 -0400 > >Hi Jan, > >When you configured your Data Domain in the Modeler, did you enable >Remote Change Notifications under the Cache Configuration? > >Thanks, > >/dev/mrg > > >On 7/28/07, Jan Lendholt wrote: > > Hey Folks, > > > > I'm using Cayenne now for 2 weeks and I'm still in my playground-phase >to > > check out the whole functionality of this leight-weighted, but yet easy >to > > use framework. > > > > Ok, here's my problem: > > > > I created a table storing a custimer id (KID), a name (name) and a >status > > (status). > > This table has one recordset with kid=2133. > > > > Now I start up my (Swing) application and create two instances of this > > application. > > Ok, I have got two buttons - one button is getting the object "Kunde" >(Kunde > > = Customer, german) and the other button modifies via the setter setName >and > > send the modification with commitChanges(). > > > > Well, now I am quite astonished: When I load my object in instance one >then > > load my object in instance two and afterwards hit den button in instance >1 > > to modify & save the changes Cayenne sets an update: > > > > INFO QueryLogger: UPDATE ACCESS.KUNDE SET NAME = ? WHERE KID = ? AND >NAME = > > ? > > INFO QueryLogger: [bind: 'Test 1', 2133, 'Test'] > > > > This is correct and works as expected. > > > > Now I hit the Modify & Save button in stance 2. i would expect that the > > statement would look like: > > > > INFO QueryLogger: UPDATE ACCESS.KUNDE SET NAME = ? WHERE KID = ? AND >NAME = > > ? > > INFO QueryLogger: [bind: 'Test 2', 2133, 'Test'] > > > > And because no row is affected/the row has been modified in the meantime >I > > would cayenne expect to raise an exception. > > > > But instead I get the following queries: > > > > INFO QueryLogger: UPDATE ACCESS.KUNDE SET NAME = ? WHERE KID = ? AND >NAME = > > ? > > INFO QueryLogger: [bind: 'Test 2', 2133, 'Test 1'] > > > > Where did cayenne get the new value for name which has been set just a >few > > seconds before? Shouldn't cayene raise an excepption? > > > > In the modeler I checked the optimist locking checkbox and checked the > > name-attribute to be used for optimistic locking and all references. > > > > Maybe one could help me, I really do not understand when cayenne is >about to > > raise an exception for optimist locked tables. > > > > Thanks in advance & best regards form Hamburg/Germany, > > > > Jan > > > > _________________________________________________________________ > > Die neue MSN Suche Toolbar mit Windows-Desktopsuche. Suchen Sie >gleichzeitig > > im Web, Ihren E-Mails und auf Ihrem PC! Jetzt neu! >http://desktop.msn.de/ > > Jetzt gratis downloaden! > > > > _________________________________________________________________ Die neue MSN Suche Toolbar mit Windows-Desktopsuche. Suchen Sie gleichzeitig im Web, Ihren E-Mails und auf Ihrem PC! Jetzt neu! http://desktop.msn.de/ Jetzt gratis downloaden!