Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 53278 invoked from network); 3 Apr 2007 16:04:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Apr 2007 16:04:08 -0000 Received: (qmail 61981 invoked by uid 500); 3 Apr 2007 16:04:14 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 61959 invoked by uid 500); 3 Apr 2007 16:04:14 -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 61950 invoked by uid 99); 3 Apr 2007 16:04:14 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2007 09:04:14 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of jerome.moliere@gmail.com designates 66.249.92.168 as permitted sender) Received: from [66.249.92.168] (HELO ug-out-1314.google.com) (66.249.92.168) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2007 09:04:06 -0700 Received: by ug-out-1314.google.com with SMTP id 78so352942ugn for ; Tue, 03 Apr 2007 09:03:39 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=FytXqbtu0uzA6/ujI2oPc5D/F1mejkAvldXkATQqJjJpXj5ItWLgv31SMhSslovbJ7ISLIOsziGa6zh9rHuS233HML5IXyMjbeH7BaUobCDHGh7swdM0aUe3F06PDR711kaGY26pqg/gRUXxGHmDgjf2Rm3GRIbDwSc5G9gkPYE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=XtERnzEEsHZpFfmr2rtWuYqS4zEpQUze+tf9Idr//y1fLYjJFEfHtKWVkUaNVSGYrCWCxfT8KP2TKwFCYJ8nOUBIHW+AMKKNSSVyu4x20a/cSAKREkmwKUjngnKL+NzFmx2GoASNDzL3N+UpXBlID4bpdRE6kUa+uHz1xuFj+0U= Received: by 10.78.179.12 with SMTP id b12mr1780826huf.1175616219302; Tue, 03 Apr 2007 09:03:39 -0700 (PDT) Received: by 10.78.77.15 with HTTP; Tue, 3 Apr 2007 09:03:39 -0700 (PDT) Message-ID: Date: Tue, 3 Apr 2007 18:03:39 +0200 From: "jerome moliere" To: user@cayenne.apache.org Subject: Re: commitChanges() doesn't imply commit in db ? In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10725_14084726.1175616219216" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_10725_14084726.1175616219216 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks for your reply michael, i was wondering about my code .... 2007/4/3, Michael Gentry : > > Hmm, this is interesting. I've noticed transactions uncommitted against > our > Sybase DB, too. I've usually attributed this to a problem with the Sybase > connection getting stale or something else going awry inside the database > because our process (and the connection to the DB) is long-running (a web > application that is hardly ever restarted) and the problem only occurs > after > it has been running for a while and a restart of the application clears > the > problem up (fetching data from the DB still works in our case, > though). It > sounds like yours isn't that long-term of a connection, though. Now I'm > wondering if there is a problem with the Sybase driver or something inside > Cayenne. Is there any chance you can make a repeatable test case? Our > experience with the issue has been very intermittent and not reproducible > and Cayenne was always logging the proper SQL. in fact it's very simple, i'll try to make a small drawing of my test: App1 = thread querying a table all 10 seconds after the first query -> send a message on a tibco queue App 2 = wait for notification on the tibco queue get the item (id passed into the message) then update this record (one field) send a message for notifying about field update via tibco App 3 = wait for the notification and displays the new value (once again query on db) SO at this point app1 runs but with bad results after the first query App2 seems to work but does'nt commit App3 is never notified... I'll try to package a small test case using openjms ? It's very disappointing because Sybase is the database choice from my customers (like in many financial companies)... Cheers jerome Thanks, > > /dev/mrg > > > On 4/3/07, jerome moliere wrote: > > > > Hi all, > > > > I'm doing a proof of concepts of several tricky usage from orm , one of > > the > > 2 implementations is Cayenne... > > I've one scenario where 3 process (stand-alone Java applications) use > the > > same table on db and communicate via Tibco rendez vous... > > It works fine with Hibernate, but I 've got several problems with > > cayenne... > > latest one is while updating one object in one of these applications, > > invoking commitChanges() on my context, nothing happens.. > > the query logger shows me a trans begin, the right update query but this > > transaction is never committed > > strange isn't it ? > > This is the output (excerpt )from my process trying to update one > entity: > > > > [java] INFO QueryLogger - +++ Connecting: SUCCESS. > > [java] INFO QueryLogger - --- transaction started. > > [java] INFO DbAdapterFactoryChain - DB name: Adaptive Server > > Enterprise > > [java] INFO QueryLogger - Detected and installed adapter: > > org.apache.cayenne.dba.sybase.SybaseAdapter > > [java] INFO QueryLogger - SELECT t0.AggregationCurrency, > > t0.AllowFixing, t0.FixingAskSpread, t0.FixingBidSpread, t0.IsIslamic, > > t0.IsLocal, t0.OISRoundingConv, t0.Currencies_Id FROM > dbo.CurrenciesLocTt0 > > WHERE t0.Currencies_Id = ? [bind: 105] - prepared in 37 ms. > > [java] INFO QueryLogger - === returned 1 row. - took 71 ms. > > [java] INFO QueryLogger - +++ transaction committed. > > [java] INFO CayenneCurrencyDAOImpl - before update isIslamicChar > set > > to = Y > > [java] INFO CayenneCurrencyDAOImpl - after update this filed is > now > > set to = N > > [java] INFO QueryLogger - --- will run 1 query. > > [java] INFO QueryLogger - --- transaction started. > > [java] INFO QueryLogger - UPDATE dbo.CurrenciesLocT SET IsIslamic > = > > ? > > WHERE Currencies_Id = ? > > [java] INFO QueryLogger - [bind: 'N', 105] > > > > > > druid shows me that the tranaction is never committed, like one of the > > other > > applications lauching as a daemon a query on this table (does not show > any > > update because there are not..) > > > > Any clue ? > > cheers > > jerome > > > > -- > > Jerome Moliere - Mentor/J > > http://romjethoughts.blogspot.com/ > > auteur Eyrolles > > > -- Jerome Moliere - Mentor/J http://romjethoughts.blogspot.com/ auteur Eyrolles ------=_Part_10725_14084726.1175616219216--