From gregnicholson@example.org Mon Jun 01 22:44:48 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 61004 invoked from network); 1 Jun 2009 22:44:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Jun 2009 22:44:48 -0000 Received: (qmail 5029 invoked by uid 500); 1 Jun 2009 22:45:00 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 4975 invoked by uid 500); 1 Jun 2009 22:45:00 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 4965 invoked by uid 99); 1 Jun 2009 22:45:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2009 22:45:00 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [83.161.120.155] (HELO elasmtp-spurfowl.atl.sa.earthlink.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2009 22:44:49 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=owUFhAMU1x7FxNrqAMmvoBowhg2zQ8JMTAgYTZyYntYFcVGzEUiFmySZPhyqH/lL; h=Received:Message-Id:From:To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [83.161.120.155] (helo=[83.161.120.155]) by elasmtp-spurfowl.atl.sa.earthlink.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.67) (envelope-from <gregnicholson@example.org>) id 1MBGF2-0001cz-7w for gregnicholson@example.org; Mon, 01 Jun 2009 18:44:28 -0400 Message-Id: <gregnicholson@example.org> From: Joe Baldwin <gregnicholson@example.org> To: gregnicholson@example.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Performance Tesing Date: Mon, 1 Jun 2009 18:44:25 -0400 X-Mailer: Apple Mail (2.935.3) X-ELNK-Trace: 74aacf41df18ac9f85338a7d01cb3b6a7e972de0d01da94011fad9e584b35b7fe9a73cc2211e64a1350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 83.161.120.155 X-Virus-Checked: Checked by ClamAV on apache.org I am attempting to do performance testing on a JSP webapp that uses Cayenne for all of the database access. I am currently using Jmeter and JConsole, but the first tests seem to indicate that there is a memory leak (either that or I am created a bad test). Does anyone have good experience with a test suite that is compatible with Cayenne in a Tomcat context? Thanks, Joe From gregnicholson@example.org Tue Jun 02 17:56:10 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 24732 invoked from network); 2 Jun 2009 17:56:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Jun 2009 17:56:10 -0000 Received: (qmail 67658 invoked by uid 500); 2 Jun 2009 17:56:22 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 67620 invoked by uid 500); 2 Jun 2009 17:56:22 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 67610 invoked by uid 99); 2 Jun 2009 17:56:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2009 17:56:22 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO web38908.mail.mud.yahoo.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 02 Jun 2009 17:56:12 +0000 Received: (qmail 73106 invoked by uid 60001); 2 Jun 2009 17:55:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1243965350; bh=mmh3KzL5Yib+bk4emNz4Dz86azB0Y1vlgjc8/oPJEOo=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=K26wdZ5+Nermm79wnvnbOwWYq9mQ1NrMeyXiSZJHn0wHoTQhHLJxP35fQFctWDFf5oHcStR/57vSpJ9DIzeRw0TrtKcyNCkiFRKK9g3o9WiR6SOtOFRVBfXEh2td+fvosFiTqAhxJ5nEHGoxBV3kG38oi55Ro1OmRwd8ZDPJOaA= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=2zQVio5cTNp5VOPecZ6+cLtgyCR5gnkviny0Gx5KMV/sYKIlQbFga59qoC/8qtWWI+oyzNi7ph0++tRJurPKYCnU3gbvPvBmlgEolFcsEDkqkfBk0892uCtRgQBMzE3Oe2FlPOyJRrhVJCFB93xX9cvpzaXXFTQPHJXaYYkPO4c=; Message-ID: <gregnicholson@example.org> X-YMail-OSG: kAELXusVM1k_xYVJh2VbK7VL6nGdMcwXv1aaCVmtH3Yj9ZItHUsZ43JxyAZRdo7fda7Xw4pJkzVLoA.DWmmfLUvQl7pbfKO5hCX7ips3VA1LhmKckmQQEYy1O_EBpVN5m9eUp9bz01RQgQa2A3eBJmdSLC9.8ikaQBdI_PbPsOED86uWupUuOQCX3CmX94C6_r9swoVXdK2A10sZvETAKdlR3j5_rxFBdHHV5kBJLoJtuJ_wZrSOCU3PQDaX68oGeoiymixrYPvDN5KwcWw71cPK9SG6.OxhkLJeIEunYvvUwV3ocRVyTUpRS48u3c7cgjVqLw-- Received: from [83.161.120.155] by web38908.mail.mud.yahoo.com via HTTP; Tue, 02 Jun 2009 10:55:50 PDT X-Mailer: YahooMailClassic/5.3.9 YahooMailWebService/0.7.289.10 Date: Tue, 2 Jun 2009 10:55:50 -0700 (PDT) From: Eric Lazarus <gregnicholson@example.org> Subject: Object Modeling -> Cayenne model: What OM tool should I use? StarUML is one I used to use... To: gregnicholson@example.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1941896883-1243965350=:23398" X-Virus-Checked: Checked by ClamAV on apache.org --0-1941896883-1243965350=:23398 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi, Fellow Cayenne-ers: I'm about to do some object modeling and the objects will end up being turn= ed into a Cayenne-managed database. What tool would I smartest to use to bu= ild my object model?=A0 What will make for the easiest transition? What exp= erience do people have building large (OK, perhaps this will only be 100 ob= jects...) object models that they want to transition to Cayenne rapidly?=20 Thanks,=20 Eric =0A501.744.6741=0A=0A=0A --0-1941896883-1243965350=:23398-- From gregnicholson@example.org Wed Jun 03 08:05:16 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 21739 invoked from network); 3 Jun 2009 08:05:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Jun 2009 08:05:16 -0000 Received: (qmail 62993 invoked by uid 500); 3 Jun 2009 08:05:28 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 62966 invoked by uid 500); 3 Jun 2009 08:05:27 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 62956 invoked by uid 99); 3 Jun 2009 08:05:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 08:05:27 +0000 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: local policy) Received: from [83.161.120.155] (HELO vorsha.objectstyle.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 03 Jun 2009 08:05:19 +0000 Received: (qmail 24428 invoked from network); 3 Jun 2009 08:04:58 -0000 Received: from unknown (HELO ?IPv888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4:1?) (83.161.120.155) by localhost with SMTP; 3 Jun 2009 08:04:58 -0000 Message-Id: <gregnicholson@example.org> From: Andrus Adamchik <gregnicholson@example.org> To: gregnicholson@example.org In-Reply-To: <gregnicholson@example.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: Performance Tesing Date: Wed, 3 Jun 2009 11:04:57 +0300 References: <gregnicholson@example.org> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org I've done a fair share of Cayenne-based application performance testing. Although I don't have a single recipe, it all depends on the application expected usage patterns. Just a general Cayenne memory management hint - if you are using Cayenne version prior to 3.0, watch out for DataContexts filling with objects. Every single object fetched via a DataContext, will be cached in it, so it is expected that the user takes care of disposing of DataContexts in one way or another (putting a DataContext in a session is a common strategy for doing that, but depending on your app this may not be enough). So if you are processing lots of objects within a single DataContext, consider replacing it manually (3.0 solves this problem by using weak references). Andrus On Jun 2, 2009, at 1:44 AM, Joe Baldwin wrote: > I am attempting to do performance testing on a JSP webapp that uses > Cayenne for all of the database access. I am currently using Jmeter > and JConsole, but the first tests seem to indicate that there is a > memory leak (either that or I am created a bad test). > > Does anyone have good experience with a test suite that is > compatible with Cayenne in a Tomcat context? > > Thanks, > Joe From gregnicholson@example.org Wed Jun 03 08:07:00 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 21860 invoked from network); 3 Jun 2009 08:07:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Jun 2009 08:07:00 -0000 Received: (qmail 63385 invoked by uid 500); 3 Jun 2009 08:07:12 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 63366 invoked by uid 500); 3 Jun 2009 08:07:12 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 63356 invoked by uid 99); 3 Jun 2009 08:07:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 08:07:12 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gregnicholson@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-bw0-f171.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 08:07:02 +0000 Received: by bwz19 with SMTP id 19so11240514bwz.4 for <gregnicholson@example.org>; Wed, 03 Jun 2009 01:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=aTmZueG60rMn7kGWEgk07lBGRvo02J/zw/FgvDDJPow=; b=W7SIwXCaDj4Cqf9Rzf2yUb8g32Z0aNK8mit7xHeSTlNLQ7MBEkZGxRMyQu6bAtg1sR R0nwgomVWX2b9PT60TDPhzlr369t3qvd4mcpFNJ6N8Ce9Ik3pkUExwi+QfjUqDkDuc6N ZLCyIS5i47bCYxDlIAlP+T+w/XAn15S3ocG2c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ZH+PZMlyIgEwg2AMOLj/x8KdLh/oej7Xozarw6cOWbiyHrt8NqDjd5Lq7DcXaNgCWE 6HxLwpltfiFdZyAanKP34SCjm6Sk9ssHBDEsSMaGyvIhJ0BSFRy658hZQBwspnoVcFlY BmaOC1AL9QfQ9ilA6Wg0w/mr7fYBrRoSY4pZ8= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id o16mr27353bkq.100.1244016402055; Wed, 03 Jun 2009 01:06:42 -0700 (PDT) In-Reply-To: <gregnicholson@example.org> References: <gregnicholson@example.org> Date: Wed, 3 Jun 2009 10:06:42 +0200 Message-ID: <gregnicholson@example.org> Subject: Re: Object Modeling -> Cayenne model: What OM tool should I use? StarUML is one I used to use... From: =?UTF-8?Q?Borut_Bol=C4=8Dina?= <gregnicholson@example.org> To: gregnicholson@example.org Content-Type: multipart/alternative; boundary=0016e6d7e9afbd4513046b6d234e X-Virus-Checked: Checked by ClamAV on apache.org --0016e6d7e9afbd4513046b6d234e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hello, I am using Visual Paradigm for UML 6 to create entities in MySQL InnoDB and then do a reverse engineer in the modeler. There is also a synchronization feature in the modeler ( http://cayenne.apache.org/doc/migrate-changes-between-model-and-database.html ). Cheers, Borut 2009/6/2 Eric Lazarus <gregnicholson@example.org> > Hi, Fellow Cayenne-ers: > > I'm about to do some object modeling and the objects will end up being > turned into a Cayenne-managed database. What tool would I smartest to use to > build my object model? What will make for the easiest transition? What > experience do people have building large (OK, perhaps this will only be 100 > objects...) object models that they want to transition to Cayenne rapidly? > > Thanks, > > Eric > > 501.744.6741 > > > --0016e6d7e9afbd4513046b6d234e-- From gregnicholson@example.org Wed Jun 03 08:10:24 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 22469 invoked from network); 3 Jun 2009 08:10:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Jun 2009 08:10:23 -0000 Received: (qmail 65373 invoked by uid 500); 3 Jun 2009 08:10:35 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 65351 invoked by uid 500); 3 Jun 2009 08:10:35 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 65341 invoked by uid 99); 3 Jun 2009 08:10:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 08:10:35 +0000 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: local policy) Received: from [83.161.120.155] (HELO vorsha.objectstyle.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 03 Jun 2009 08:10:27 +0000 Received: (qmail 26647 invoked from network); 3 Jun 2009 08:10:06 -0000 Received: from unknown (HELO ?IPv888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4:1?) (83.161.120.155) by localhost with SMTP; 3 Jun 2009 08:10:06 -0000 Message-Id: <gregnicholson@example.org> From: Andrus Adamchik <gregnicholson@example.org> To: gregnicholson@example.org In-Reply-To: <gregnicholson@example.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: Performance Tesing Date: Wed, 3 Jun 2009 11:10:05 +0300 References: <gregnicholson@example.org> <gregnicholson@example.org> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org And another one... Query cache and snapshot cache are all using LRUMaps, so they won't grow indefinitely even in 2.0, however the total amount of RAM given to the JVM may not be enough to fill the LRU to the full default capacity. So either consider reducing the "Size of Object Cache" in the Modeler, or give your process more memory with -Xmx. In any event, consider using a profiler to check what causes a memory leak. This may be faster than guessing. Can't recommend anything free (there should be some Eclipse plugins??). I am using YourKit profiler for this purpose. Andrus On Jun 3, 2009, at 11:04 AM, Andrus Adamchik wrote: > I've done a fair share of Cayenne-based application performance > testing. Although I don't have a single recipe, it all depends on > the application expected usage patterns. > > Just a general Cayenne memory management hint - if you are using > Cayenne version prior to 3.0, watch out for DataContexts filling > with objects. Every single object fetched via a DataContext, will be > cached in it, so it is expected that the user takes care of > disposing of DataContexts in one way or another (putting a > DataContext in a session is a common strategy for doing that, but > depending on your app this may not be enough). So if you are > processing lots of objects within a single DataContext, consider > replacing it manually (3.0 solves this problem by using weak > references). > > Andrus > > > On Jun 2, 2009, at 1:44 AM, Joe Baldwin wrote: >> I am attempting to do performance testing on a JSP webapp that uses >> Cayenne for all of the database access. I am currently using >> Jmeter and JConsole, but the first tests seem to indicate that >> there is a memory leak (either that or I am created a bad test). >> >> Does anyone have good experience with a test suite that is >> compatible with Cayenne in a Tomcat context? >> >> Thanks, >> Joe > > From gregnicholson@example.org Wed Jun 03 19:18:05 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 62836 invoked from network); 3 Jun 2009 19:18:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Jun 2009 19:18:05 -0000 Received: (qmail 17767 invoked by uid 500); 3 Jun 2009 19:18:17 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 17752 invoked by uid 500); 3 Jun 2009 19:18:17 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 17742 invoked by uid 99); 3 Jun 2009 19:18:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 19:18:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [83.161.120.155] (HELO elasmtp-dupuy.atl.sa.earthlink.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2009 19:18:04 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=F9Mg6mZUsTp0RaQOwI2A2wKg4yQuLQZV7vge2TimPA3Oco6xmZjpYUqn9f+Ofebr; h=Received:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [83.161.120.155] (helo=[83.161.120.155]) by elasmtp-dupuy.atl.sa.earthlink.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.67) (envelope-from <gregnicholson@example.org>) id 1MBvy3-0003fz-Cs for gregnicholson@example.org; Wed, 03 Jun 2009 15:17:43 -0400 Message-Id: <gregnicholson@example.org> From: Joe Baldwin <gregnicholson@example.org> To: gregnicholson@example.org In-Reply-To: <gregnicholson@example.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: Performance Tesing Date: Wed, 3 Jun 2009 15:17:42 -0400 References: <gregnicholson@example.org> <gregnicholson@example.org> <gregnicholson@example.org> X-Mailer: Apple Mail (2.935.3) X-ELNK-Trace: 74aacf41df18ac9f85338a7d01cb3b6a7e972de0d01da9403ef699a1757fb900e1bbccc2fc4a556d350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 83.161.120.155 X-Virus-Checked: Checked by ClamAV on apache.org Andrus, thanks a lot for the hints. 1. I have designed using Cayenne 3.0 (with MySQL & JSP). I have converted over from DataContext to BaseContext (as best as I have been able to follow your usage instructions). 2. Given all the layers of caching (MySQL, Cayenne, Tomcat, etc), my intuition is lacking with respect to expected behavior. So my generic approach is to first implement your "best practices" for my unit testing, then devise an appropriate load test (one that will simulate about 50-100 concurrent users using JMeter). (Based on your input I should probably think about using a finer-grained profiler like YourKit as well) My problem is that given all of the advanced caching going on, I have very little idea of what a healthy profile should look like. Therefore, I am guessing at this point. :) Conditions: - Java 1.5, MySQL, JSP, Tomcat - Cayenne 3.0, BaseContext, MaxObjects=10000, SharedCache, MaxConnections=10 - 50-100 concurrent user threads - Tomcat: (two cases) Xms64m & Xms256m, both with SessionTimeOut=5min - MyDesign: store the large search-result lists in a custom class store in a session object (which is released on session timeout) Results: At Xms64m, the website grinds to a halt at about 50 user threads. Using Xms256m, there seems to be no issue with degraded performance. For both max-heap values, after 5 min, most of the memory is released (i.e. 70MB @max and 20MB after release and GC). There always seems to be some residual memory used over base line but this appears to be constant and not growing. Questions: 1. With this simple test there does not appear to be the characteristic stair step associated with a memory leak. *If* my assumptions are correct then I simply need to set Tomcat-Xms to support the Cayenne caching implementation. Does this sound correct? 2. When I am able to predict the appropriate user needs: I attempt to nullify all of my search list references and then garbage collect (to message BaseContext to do any house-cleaning). Is this sufficient (with the Cayenne 3.0 weak-reference model) or do I need to read more documentation on "house cleaning" procedures? 3. I have, at best, a peripheral understanding of BaseContext, especially wrt optimal usage for WebApps. When I use BaseContext.getThreadObjectContext() to perform a query, will I generate two separate objects (for the same MySQL data mapping) for two separate users requesting the same data? I would assume that he answer and there is a single cache for both user threads and that two *references* to the cached objects are generated. Am I close, or do I need to do some more Cayenne homework? :) Thanks Joe On Jun 3, 2009, at 4:10 AM, Andrus Adamchik wrote: > And another one... > > Query cache and snapshot cache are all using LRUMaps, so they won't > grow indefinitely even in 2.0, however the total amount of RAM given > to the JVM may not be enough to fill the LRU to the full default > capacity. So either consider reducing the "Size of Object Cache" in > the Modeler, or give your process more memory with -Xmx. > > In any event, consider using a profiler to check what causes a > memory leak. This may be faster than guessing. Can't recommend > anything free (there should be some Eclipse plugins??). I am using > YourKit profiler for this purpose. > > Andrus > > > On Jun 3, 2009, at 11:04 AM, Andrus Adamchik wrote: > >> I've done a fair share of Cayenne-based application performance >> testing. Although I don't have a single recipe, it all depends on >> the application expected usage patterns. >> >> Just a general Cayenne memory management hint - if you are using >> Cayenne version prior to 3.0, watch out for DataContexts filling >> with objects. Every single object fetched via a DataContext, will >> be cached in it, so it is expected that the user takes care of >> disposing of DataContexts in one way or another (putting a >> DataContext in a session is a common strategy for doing that, but >> depending on your app this may not be enough). So if you are >> processing lots of objects within a single DataContext, consider >> replacing it manually (3.0 solves this problem by using weak >> references). >> >> Andrus >> >> >> On Jun 2, 2009, at 1:44 AM, Joe Baldwin wrote: >>> I am attempting to do performance testing on a JSP webapp that >>> uses Cayenne for all of the database access. I am currently using >>> Jmeter and JConsole, but the first tests seem to indicate that >>> there is a memory leak (either that or I am created a bad test). >>> >>> Does anyone have good experience with a test suite that is >>> compatible with Cayenne in a Tomcat context? >>> >>> Thanks, >>> Joe >> >> > From gregnicholson@example.org Thu Jun 04 06:42:59 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 7124 invoked from network); 4 Jun 2009 06:42:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jun 2009 06:42:59 -0000 Received: (qmail 99028 invoked by uid 500); 4 Jun 2009 06:43:11 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 98999 invoked by uid 500); 4 Jun 2009 06:43:11 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 98989 invoked by uid 99); 4 Jun 2009 06:43:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2009 06:43:11 +0000 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.161.120.155] (HELO mho-02-ewr.mailhop.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2009 06:42:59 +0000 Received: from cpe-69-204-109-121.buffalo.res.rr.com ([83.161.120.155] helo=insysware.insysware.com) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.68) (envelope-from <gregnicholson@example.org>) id 1MC6es-000DMY-3f for gregnicholson@example.org; Thu, 04 Jun 2009 06:42:38 +0000 X-Mail-Handler: MailHop Outbound by DynDNS X-Originating-IP: 83.161.120.155 X-Report-Abuse-To: gregnicholson@example.org (see http://www.dyndns.com/services/mailhop/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+PL0jqp+9bLq4EONY5Gw6XwnFuX6pz3o8= Content-class: urn:content-classes:message Subject: Best way to turn a DataRow into an Object instance in ROP client? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C9E4E1.6A38DEBA" Date: Thu, 4 Jun 2009 02:55:15 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <gregnicholson@example.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Best way to turn a DataRow into an Object instance in ROP client? Thread-Index: Acnk36V6JUwjKUAwRGSTEfmaKnEfIA== From: "Zissis Trabaris" <gregnicholson@example.org> To: <gregnicholson@example.org> X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C9E4E1.6A38DEBA Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have a DataRow in an ROP client. Is there a way to turn it into an object registered to a CayenneContext without doing another read to the database? =20 Zissis Trabaris * Chief Technology Officer * INSYSWARE * 3235 West River Road, Grand Island, New York, 14072, USA=20 Mobile 501.744.6741 * Office 501.744.6741 * Fax 501.744.6741 * gregnicholson@example.org <mailto:%gregnicholson@example.org> * www.insysware.com <http://www.insysware.com/> =20 ________________________________ CONFIDENTIALITY: This email (including any attachments) may contain confidential, proprietary and privileged information, and unauthorized disclosure or use is prohibited. If you received this email in error, please notify the sender and delete this email from your system. Thank you.=20 =20 ------_=_NextPart_001_01C9E4E1.6A38DEBA-- From gregnicholson@example.org Thu Jun 04 07:39:05 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 19802 invoked from network); 4 Jun 2009 07:39:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jun 2009 07:39:05 -0000 Received: (qmail 71884 invoked by uid 500); 4 Jun 2009 07:39:16 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 71849 invoked by uid 500); 4 Jun 2009 07:39:16 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 71839 invoked by uid 99); 4 Jun 2009 07:39:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2009 07:39:16 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gregnicholson@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO yw-out-1718.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2009 07:39:07 +0000 Received: by yw-out-1718.google.com with SMTP id 5so330998ywr.82 for <gregnicholson@example.org>; Thu, 04 Jun 2009 00:38:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:mime-version:subject:date:x-mailer; bh=Yy12R290xSoacOWnBOjrs0bWWk2KaPtdIevnuJwkLOU=; b=BWNv22h/GWBj+gxESKD0CgKNZxeN20TkktnkKIJVpuC3Ily20LNGiabCiGwUSSRK7H MLRoZ/a+XakDfUlGn6FPChsDxyN2LiTS05z2ZsT7Qf4avbRBjl8HZZitUb4WgtCTZi73 XnTg4yIQdzKaqX7T+8Phw3FIUiGmll0dnqqno= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:mime-version:subject:date:x-mailer; b=jcnpH9zNrh/b0zbeZorjfKiNUp+wdVMUIilMkGZRGO7YaVSh3WV9c25vGSCS9f+8zw kgUsRgd+K6gbAuc48yv1CXNvXHHsOu+0RpLxBARsFHWE3tIrmcsQ34Crt6QTbSMVjTLJ CghvEJSB9LqX7zeunurITqNjo5U3vx/ZBEmrI= Received: by 83.161.120.155 with SMTP id h11mr1629326agh.45.1244101126503; Thu, 04 Jun 2009 00:38:46 -0700 (PDT) Received: from ?83.161.120.155? ([83.161.120.155]) by mx.google.com with ESMTPS id 39sm3057137aga.21.283.161.120.155.38.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 04 Jun 2009 00:38:46 -0700 (PDT) Message-Id: <gregnicholson@example.org> From: Lawrence Gerstley <gregnicholson@example.org> To: gregnicholson@example.org Content-Type: multipart/alternative; boundary=Apple-Mail-16--494048154 Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Creating multiple datamaps on the fly Date: Thu, 4 Jun 2009 00:38:44 -0700 X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-16--494048154 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hello, I'm trying to create multiple DataMaps and attach them to my DataDomain on the fly in an application. The DataMap itself that I created with the modeler is fine, but I want to be able to create new ones on demand to point to a new table set in my db. So, my DataMap might consist of DbEntities whose prefixes all start with "lba1_". I can iterate through the map attached to the domain loaded up like so: ================================================================ for (DbEntity entity : currentMap.getDbEntities()) { if (entity.getName().indexOf("_") > 0) { entity.setName(entity.getName().replaceFirst(".*_", instancePrefix + "_")); } } ================================================================ I'd like to clone the DataMap and then iterate through it with the code above, and then add that DataMap to the DataDomain. Is that possible? Thanks, Lawrence --Apple-Mail-16--494048154-- From gregnicholson@example.org Thu Jun 04 11:22:13 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 88896 invoked from network); 4 Jun 2009 11:22:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jun 2009 11:22:13 -0000 Received: (qmail 3112 invoked by uid 500); 4 Jun 2009 11:22:25 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 3090 invoked by uid 500); 4 Jun 2009 11:22:25 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 3080 invoked by uid 99); 4 Jun 2009 11:22:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2009 11:22:25 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gregnicholson@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-ew0-f228.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2009 11:22:17 +0000 Received: by ewy28 with SMTP id 28so998384ewy.4 for <gregnicholson@example.org>; Thu, 04 Jun 2009 04:21:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=GZNdmkFviOTeQtDr6ezof6vUcevuN25c+T5l4+3J6fU=; b=Z2UnHfXGcwZ+1hmaVDPc0hUcYHTBbslO/qOxgjAQMQPqqzxJcer8lhJz1sD5ihh77N QiEhtfvm51QiZ0mze+Ber8AL7u8FzJJg+WCjhKVq01R5iB7V9IzDqfU5IkUUst1qJfmp 5GOFXZOcyn8z3GH80sV4+aGO/GXc5IbZ+5KGE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=tcb/UQ0h+UTscYkdHSc2kB2pAHBF4X5vj6RQCJw/RUfLh8bjy6MXUnIN9atwWGA3q9 fD80SXiUjjhLWa1dfMoWKH2JuBEVZTur0wmm9nDG6AxogkA5nQHBQmfCr9UOjzXvRfP9 gLf7aQC4gCMs0URWf5kOfU8X54ai9EMKB4c7A= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id 60mr701938wew.36.1244114514973; Thu, 04 Jun 2009 04:21:54 -0700 (PDT) In-Reply-To: <gregnicholson@example.org> References: <gregnicholson@example.org> Date: Thu, 4 Jun 2009 15:21:54 +0400 Message-ID: <gregnicholson@example.org> Subject: Re: Creating multiple datamaps on the fly From: Andrey Razumovsky <gregnicholson@example.org> To: gregnicholson@example.org Content-Type: multipart/alternative; boundary=001485f6cd66b9939b046b83fbc7 X-Virus-Checked: Checked by ClamAV on apache.org --001485f6cd66b9939b046b83fbc7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, I'm not sure that I correctly understood your problem, but cloning datamap is definitely possible. Alas, I don't know about any ready methods for that. You can either clone DataMap manually (i.e. create new map with new name, copy properties from original map, put there entities etc. with new names and then attach it to domain) or clone whole datamap via serialization and then change names of its "entries". Sort of second way is implemented in modeler's PasteAction.paste(...). Note that entity names must be unique in whole DataDomain. Andrey 2009/6/4 Lawrence Gerstley <gregnicholson@example.org> > Hello, > > I'm trying to create multiple DataMaps and attach them to my DataDomain on > the fly in an application. The DataMap itself that I created with the > modeler is fine, but I want to be able to create new ones on demand to point > to a new table set in my db. So, my DataMap might consist of DbEntities > whose prefixes all start with "lba1_". I can iterate through the map > attached to the domain loaded up like so: > ================================================================ > for (DbEntity entity : currentMap.getDbEntities()) { > if (entity.getName().indexOf("_") > 0) { > entity.setName(entity.getName().replaceFirst(".*_", instancePrefix + > "_")); > } > } > ================================================================ > I'd like to clone the DataMap and then iterate through it with the code > above, and then add that DataMap to the DataDomain. Is that possible? > > Thanks, > > Lawrence > > --001485f6cd66b9939b046b83fbc7-- From gregnicholson@example.org Thu Jun 04 12:06:30 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 98150 invoked from network); 4 Jun 2009 12:06:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jun 2009 12:06:30 -0000 Received: (qmail 67240 invoked by uid 500); 4 Jun 2009 12:06:42 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 67216 invoked by uid 500); 4 Jun 2009 12:06:42 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 67206 invoked by uid 99); 4 Jun 2009 12:06:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2009 12:06:42 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gregnicholson@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-bw0-f219.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2009 12:06:34 +0000 Received: by bwz19 with SMTP id 19so803363bwz.4 for <gregnicholson@example.org>; Thu, 04 Jun 2009 05:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=zIaTzTO6ZdKeVvhe8eoA93WS4FC5kNc1rcGVokM0ejY=; b=qe0fGcc2ornTeUrfSWqXxrntlVMtcZykv8qR7Z3VgzrRpOuFJg0+d7rtc8wE/A0boc Wp7yHNo/s9qLRE4yCAwCDMd7sQP8ACkUiN5sDvJKyEo6rnJ5QXB6FTAMtOEk/cqp5Poo PublWmKaHtbMH1/NlS4CevKOX/P2escRnvrns= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=xSElJEUz7fQVM9/O09S2NZoWM7Hogd+OsBT6qsDWxLEuW2/6Q4g8QLn8S8mqutVJOc EWipvILjbF55HD9hfFS+UyJ4pN3EuS+Tf2kZU3kNRz3pNiBNNxt3uTLsilBy2GlJck8c PR92mpTpwbzPfqQa0726BayNV9PRaMRFJt1VY= MIME-Version: 1.0 Received: by 83.161.120.155 with SMTP id o16mr1370194bkq.100.1244117172708; Thu, 04 Jun 2009 05:06:12 -0700 (PDT) In-Reply-To: <gregnicholson@example.org> References: <gregnicholson@example.org> Date: Thu, 4 Jun 2009 14:06:12 +0200 Message-ID: <gregnicholson@example.org> Subject: Re: Cayenne 3.0M6 released From: =?UTF-8?Q?Borut_Bol=C4=8Dina?= <gregnicholson@example.org> To: gregnicholson@example.org Content-Type: multipart/alternative; boundary=0016e6d7e9af2366e4046b849ab9 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6d7e9af2366e4046b849ab9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, congratulations for this release. I had just replaced M5 with M6 and got one compile error. This worked under M5: ResultIterator it = null; try { it = context.performIteratedQuery(sq); while (it.hasNextRow()) { Map row = it.nextDataRow(); ... I read the release notes and found https://issues.apache.org/jira/browse/CAY-1147. While I think the nextDataRow was not marked as deprecated in M5, is it safe to replace the assignement to: Map row = (Map) it.nextRow(); which compiles under M6? Thanks, Borut 2009/5/29 Aristedes Maniatis <gregnicholson@example.org> > Another release on the journey to Cayenne 3.0! This milestone adds a > plethora of new features including quoting of identifiers (useful for db > column names with spaces), nested contexts in ROP, and > EJBQL/SQLTemplate/ProcedureQuery queries now support the full range of > configuration options available to native SelectQueries. The Modeler > received new features such schema analysis on startup (which can prompt the > user to create or upgrade the database schema) and support for EJBQL. > Naturally, lots of bug fixes have also made it into Cayenne in the last 5 > months since the previous milestone. > > The Cayenne team have also decided to not target JPA compliance for 3.0, > and instead focus on further improvements to the range and flexibility of > the native API. Although Cayenne may return to focus on JPA in the future, > the work done already (such as lifecycle events, EJBQL, etc) has been very > useful and will remain important parts of Cayenne for everyone to use. > Cayenne's clean and powerful API is one of the main reasons users choose > this library and focussing our efforts there is our primary goal. > > We hope you enjoy this latest release. There will probably be only one more > release with new features before 3.0 is settled into beta testing, so we > encourage everyone to try this latest milestone, and report back to us with > any important missing functionality. We have several developers who track > Cayenne trunk reasonably closely in production systems, so we are confident > of the stability of this release. It is likely that there will be some API > changes before the final 3.0 is released. > > Download: http://cayenne.apache.org/download.html > > Full release notes: > http://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12313759&styleName=Text&projectId=12310903 > > > Ari Maniatis, on behalf of the Cayenne PMC > --0016e6d7e9af2366e4046b849ab9-- From gregnicholson@example.org Thu Jun 04 13:44:59 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 41555 invoked from network); 4 Jun 2009 13:44:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Jun 2009 13:44:59 -0000 Received: (qmail 31038 invoked by uid 500); 4 Jun 2009 13:45:07 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 31015 invoked by uid 500); 4 Jun 2009 13:45:07 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 30961 invoked by uid 99); 4 Jun 2009 13:45:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jun 2009 13:45:07 +0000 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: local policy) Received: from [83.161.120.155] (HELO vorsha.objectstyle.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 04 Jun 2009 13:44:59 +0000 Received: (qmail 19986 invoked from network); 4 Jun 2009 13:44:38 -0000 Received: from unknown (HELO ?IPv888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4:1?) (83.161.120.155) by localhost with SMTP; 4 Jun 2009 13:44:38 -0000 Message-Id: <gregnicholson@example.org> From: Andrus Adamchik <gregnicholson@example.org> To: gregnicholson@example.org In-Reply-To: <gregnicholson@example.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: Cayenne 3.0M6 released Date: Thu, 4 Jun 2009 16:44:36 +0300 References: <gregnicholson@example.org> <gregnicholson@example.org> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org On Jun 4, 2009, at 3:06 PM, Borut Bol=C4=8Dina wrote: > > Map row =3D it.nextDataRow(); > ... > > is it safe to replace the > assignement to: > > Map row =3D (Map) it.nextRow(); > > which compiles under M6? Yes.= From gregnicholson@example.org Fri Jun 05 08:44:13 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 30150 invoked from network); 5 Jun 2009 08:44:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 5 Jun 2009 08:44:13 -0000 Received: (qmail 85494 invoked by uid 500); 5 Jun 2009 08:44:25 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 85433 invoked by uid 500); 5 Jun 2009 08:44:25 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 85423 invoked by uid 99); 5 Jun 2009 08:44:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jun 2009 08:44:25 +0000 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 gregnicholson@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-fx0-f222.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jun 2009 08:44:15 +0000 Received: by fxm22 with SMTP id 22so1563782fxm.4 for <gregnicholson@example.org>; Fri, 05 Jun 2009 01:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=uU9fOegvrlP44lzdS3aYZZZFUydIFJjVadVDKbx77hA=; b=N3eU5yGVBhFJyAafA+QsO7/N1yUGZG/0ksmlyhFaA0yB+hLJGA4vOiEJi6VegcqyNY OAeuNunAR2Sxfwpq66ZHXif1cbTA6KNXV+5X9IsfWrHFyfNuRZYDJVdlw3cno29Rt59m 8OHM4/zHmL0saNbve15j7Ed9DEaJ4Pzw9V5ok= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=VFqPosRLNAM9z44QAERN8/5NzRorSG/VfZTj5cdYqsnN+XH//G7XIpMlnBYQbTptP3 ILhAzKIug02+cTHl6GN/G6gaojtIhS7ShQYHShTQN7/owdwD8V0e+M7shoQPs+u8suhh tf5FnP0at1FngFU8yEQsm+A0NfFP6V29gyi8Y= MIME-Version: 1.0 Sender: gregnicholson@example.org Received: by 83.161.120.155 with SMTP id a1mr1804240fas.52.1244191413281; Fri, 05 Jun 2009 01:43:33 -0700 (PDT) Date: Fri, 5 Jun 2009 10:43:33 +0200 X-Google-Sender-Auth: 604019d7dcd16a46 Message-ID: <gregnicholson@example.org> Subject: Problems with Expression.match() From: =?ISO-8859-1?Q?=D8yvind_Harboe?= <gregnicholson@example.org> To: gregnicholson@example.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I'm trying to figure out if a CayenneDataObject matches an expression and I run into various and sundry problems. This is the final solution I ended up with, but it's pretty ugly. List l=3DgetDataContext().performQuery(new SelectQuery(Treatment.class, expression))); return l.contains(this); 1. I can't use expression.match() because it will fail when the expression contains an array in the path. I.e. matchExp(role.members.user, user) here "members" will return a list, and this causes an exception for .match(), whereas it w= orks fine in a query. 2. In the above statement I don't know how to add a andExp() to only return "this", so I get a bigger query result than I need + unecessary post proces= sing. I've run into this problem previously as well, without finding an elegant solution. --=20 =D8yvind Harboe Embedded software and hardware consulting services http://consulting.zylin.com From gregnicholson@example.org Fri Jun 05 10:24:26 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 77580 invoked from network); 5 Jun 2009 10:24:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 5 Jun 2009 10:24:26 -0000 Received: (qmail 46432 invoked by uid 500); 5 Jun 2009 10:24:38 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 46416 invoked by uid 500); 5 Jun 2009 10:24:38 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 46406 invoked by uid 500); 5 Jun 2009 10:24:38 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 46403 invoked by uid 99); 5 Jun 2009 10:24:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jun 2009 10:24:38 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gregnicholson@example.org designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO mail-bw0-f219.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jun 2009 10:24:27 +0000 Received: by bwz19 with SMTP id 19so1388303bwz.12 for <gregnicholson@example.org>; Fri, 05 Jun 2009 03:24:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ZKiT/kffZpHmx2/bKAmF3My7DzqX/G++OyIPurpDR/Q=; b=Q94U0CxkW71ATCAcxLbJO4snLERqeUpSCPYTSPFGYDs1jewBR+D1ei0YLtqhp6P84m G6N7Zuhdz3PAtCPCfwrDslzk08qzigg2fb0+wyup1NTvM+RmvOCd9XBMx71gTBiK0TkN Bsa26K6pxmSREAUvlZJxwMgn8cgsFEqQ7bDFY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; b=Gez/qiUI8doBMLUpI1C3FkgtD1Tx1jPM1Y4RcKtqpkSEvaLWcgTBd7S6+h9e+c6Yse UskS+nQ1/Bh3XChn4col8qz6yI943yUrEFSmhBcchvvhrEdljnCIJQqrbYTaPi4/bEP5 gyxFma8sNickBsm2Eo0hqmzCKVEtVoiGySVlU= MIME-Version: 1.0 Sender: gregnicholson@example.org Received: by 83.161.120.155 with SMTP id x12mr1907271fap.70.1244197447031; Fri, 05 Jun 2009 03:24:07 -0700 (PDT) Date: Fri, 5 Jun 2009 12:24:07 +0200 X-Google-Sender-Auth: 48a643e7aa103dbf Message-ID: <gregnicholson@example.org> Subject: Inverting an expression From: =?ISO-8859-1?Q?=D8yvind_Harboe?= <gregnicholson@example.org> To: gregnicholson@example.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I've got an expression that returns all "incidents" that matches the area of responsibility for a "user". Is there a way to programatically invert such an expression to return all "= user" who are responsible for an "incident"? The problem with a manual conversion is that it introduces the changes of bugs creeping in. A trivial example: exp=3DExpressionFactory.matchExp(Incident.TO_USER, user) =3D> all incidents= assigned to a user. exp=3DExpressionFactory.matchExp(User.TO_INCIDENT, incident) =3D> all users= assigned to an incident. A more complicated example by throwing in roles: exp=3Dexp.orExp(ExpressionFactory.matchExp(Incident.TO_ROLE + "+." + Role.TO_MEMBER_ARRAY + "." + Member.TO_USER, user)) =3D> return all incidents where a user is the member of the role who's responsible. The trick here is that the role is optional, so an outer join is used. I need the reverse query that returns all the users responsible for an incident... --=20 =D8yvind Harboe Embedded software and hardware consulting services http://consulting.zylin.com From gregnicholson@example.org Fri Jun 05 10:50:21 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 90729 invoked from network); 5 Jun 2009 10:50:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 5 Jun 2009 10:50:20 -0000 Received: (qmail 82257 invoked by uid 500); 5 Jun 2009 10:50:32 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 82236 invoked by uid 500); 5 Jun 2009 10:50:32 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 82226 invoked by uid 99); 5 Jun 2009 10:50:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Jun 2009 10:50:32 +0000 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: local policy) Received: from [83.161.120.155] (HELO vorsha.objectstyle.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 05 Jun 2009 10:50:21 +0000 Received: (qmail 1697 invoked from network); 5 Jun 2009 10:49:59 -0000 Received: from unknown (HELO ?IPv888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4:1?) (83.161.120.155) by localhost with SMTP; 5 Jun 2009 10:49:59 -0000 Message-Id: <gregnicholson@example.org> From: Andrus Adamchik <gregnicholson@example.org> To: gregnicholson@example.org In-Reply-To: <gregnicholson@example.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: Best way to turn a DataRow into an Object instance in ROP client? Date: Fri, 5 Jun 2009 13:49:58 +0300 References: <gregnicholson@example.org> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org > I have a DataRow in an ROP client. > Is there a way to turn it into an > object registered to a CayenneContext > without doing another read to the > database? You can using DataObjectUtils. But this will incur a trip to the server. Whether the server will query the DB or not depends on whether the object has been cached already on the server. Andrus On Jun 4, 2009, at 9:55 AM, Zissis Trabaris wrote: > I have a DataRow in an ROP client. Is there a way to turn it into an > object registered to a CayenneContext without doing another read to > the > database? > > > > Zissis Trabaris * Chief Technology Officer * INSYSWARE * 3235 West > River > Road, Grand Island, New York, 14072, USA > Mobile 501.744.6741 * Office 501.744.6741 * Fax 501.744.6741 * > gregnicholson@example.org <mailto:%gregnicholson@example.org> * > www.insysware.com <http://www.insysware.com/> > > ________________________________ > > CONFIDENTIALITY: This email (including any attachments) may contain > confidential, proprietary and privileged information, and unauthorized > disclosure or use is prohibited. If you received this email in error, > please notify the sender and delete this email from your system. Thank > you. > > > From gregnicholson@example.org Sat Jun 06 17:26:25 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 97171 invoked from network); 6 Jun 2009 17:26:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Jun 2009 17:26:22 -0000 Received: (qmail 3963 invoked by uid 500); 6 Jun 2009 17:26:33 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 3922 invoked by uid 500); 6 Jun 2009 17:26:33 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 3909 invoked by uid 99); 6 Jun 2009 17:26:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Jun 2009 17:26:33 +0000 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: local policy) Received: from [83.161.120.155] (HELO elasmtp-mealy.atl.sa.earthlink.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Jun 2009 17:26:23 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=nS5WiPkib5t7gPZEpuRW/ISnYaaZFZC7Wey5ePzGSXVd1ONgXdcskE2cQLQyMXWl; h=Received:Message-Id:From:To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [83.161.120.155] (helo=[83.161.120.155]) by elasmtp-mealy.atl.sa.earthlink.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.67) (envelope-from <gregnicholson@example.org>) id 1MCzed-0001RA-2i for gregnicholson@example.org; Sat, 06 Jun 2009 13:26:03 -0400 Message-Id: <gregnicholson@example.org> From: Joe Baldwin <gregnicholson@example.org> To: gregnicholson@example.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Configuring Caching 3.0M6 Date: Sat, 6 Jun 2009 13:26:01 -0400 X-Mailer: Apple Mail (2.935.3) X-ELNK-Trace: 74aacf41df18ac9f85338a7d01cb3b6a7e972de0d01da940360389327e01fa6df637ae627ae0f84d350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 83.161.120.155 X-Virus-Checked: Checked by ClamAV on apache.org I am attempting to learn how to control and configure caching. I have hit some obstacles and need some insight to better understand this. Question 1: I have set "Use Shared Cache" to TRUE via Cayenne Modeler. How can I verify (via live code) the state of the Cache mode/strategy? Second, I read the docs "Configuring Caching Behavior" and it appears to assert that the "Cache Configuration" panel of the Modeler is used to set the default caching strategy to Shared True/False. If I understand this, then it appears that the "Use Shared Cache" parameter propagates to all DataDomains. Question 2: After reading this and the docs on Query Cache Strategy, I am have difficulty reconciling the two. (In fact, after messaging a number of live objects, I have convinced myself that I have absolutely no idea what Cache strategy that I have actually configured. :) ) So I think the first order of business is to ask how to reconcile the default cache for the DataDomain (controlled by the modeler) with the Query cache (controlled in the code), and also how do I ask Cayenne objects for the current settings. Thanks, Joe From gregnicholson@example.org Sat Jun 06 18:23:02 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 27931 invoked from network); 6 Jun 2009 18:23:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Jun 2009 18:23:02 -0000 Received: (qmail 37466 invoked by uid 500); 6 Jun 2009 18:23:12 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 37454 invoked by uid 500); 6 Jun 2009 18:23:12 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 37423 invoked by uid 99); 6 Jun 2009 18:23:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Jun 2009 18:23:12 +0000 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: local policy) Received: from [83.161.120.155] (HELO elasmtp-banded.atl.sa.earthlink.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Jun 2009 18:23:03 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=MEdp/ra78yoMy37PXCLtXgnDEHwRVS16go3VPsgNrbScm6Gzu2iES7WbS+fbuiha; h=Received:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [83.161.120.155] (helo=[83.161.120.155]) by elasmtp-banded.atl.sa.earthlink.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.67) (envelope-from <gregnicholson@example.org>) id 1MD0XS-00078L-5e for gregnicholson@example.org; Sat, 06 Jun 2009 14:22:42 -0400 Message-Id: <gregnicholson@example.org> From: Joe Baldwin <gregnicholson@example.org> To: gregnicholson@example.org In-Reply-To: <gregnicholson@example.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: Configuring Caching 3.0M6 Date: Sat, 6 Jun 2009 14:22:41 -0400 References: <gregnicholson@example.org> X-Mailer: Apple Mail (2.935.3) X-ELNK-Trace: 74aacf41df18ac9f85338a7d01cb3b6a7e972de0d01da9403f85a0d2cdb94c3e31374826f64dafb5350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 83.161.120.155 X-Virus-Checked: Checked by ClamAV on apache.org OK, I have been doing some more reading and it appears that there are two separate Cayenne-3.0 caching models: 1. Query Caching 2. Object Caching I am starting to think that I have a fundamental misunderstanding about the concept of "shared cache". Question: In a JSP webapp scenario with sessions, it appears that each session gets its own ObjectContext (via getThreadObjectContext()). If this is true, then, for example with an ECommerce site with a Product abstraction, if one user queries Cayenne for a list of Products, and then a second user makes the identical request are there ultimately two data objects created for each Product or just one data object? My expectation used to be that there was one data object for each Product, but given my reading, it appears that there are two. If there are two, and I really want just one, should I start implementing some sort of query caching? Thanks, Joe From gregnicholson@example.org Sun Jun 07 17:29:02 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 9967 invoked from network); 7 Jun 2009 17:29:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 7 Jun 2009 17:29:02 -0000 Received: (qmail 92041 invoked by uid 500); 7 Jun 2009 17:29:13 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 91994 invoked by uid 500); 7 Jun 2009 17:29:13 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 91984 invoked by uid 99); 7 Jun 2009 17:29:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Jun 2009 17:29:13 +0000 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: local policy) Received: from [83.161.120.155] (HELO elasmtp-curtail.atl.sa.earthlink.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Jun 2009 17:29:04 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=UbUU2mzKs49b7nhv6FCt8+Vtof0VX5DHtUR2arJywAniqnpFZEusBLYaW35S1TsD; h=Received:Message-Id:From:To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:X-Mailer:X-ELNK-Trace:X-Originating-IP; Received: from [83.161.120.155] (helo=[83.161.120.155]) by elasmtp-curtail.atl.sa.earthlink.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.67) (envelope-from <gregnicholson@example.org>) id 1MDMAl-00046u-5N for gregnicholson@example.org; Sun, 07 Jun 2009 13:28:43 -0400 Message-Id: <gregnicholson@example.org> From: Joe Baldwin <gregnicholson@example.org> To: gregnicholson@example.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Modeler Bug: DataNode Connection Info Date: Sun, 7 Jun 2009 13:28:41 -0400 X-Mailer: Apple Mail (2.935.3) X-ELNK-Trace: 74aacf41df18ac9f85338a7d01cb3b6a7e972de0d01da9404f9a1602fbb56d94054c2918f68a1e7e350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 83.161.120.155 X-Virus-Checked: Checked by ClamAV on apache.org I am fairly certain this is a modeler bug, and I have some recollection that I might have bumped into it previously. Cayenne Version: 3.0M6 Modeler Platform: OSX (OSX version 10.5.7) Actions taken: I deleted my .cayenne directory an re-entered my preferences When Executing the following from Modeler: 1. Tools - Generate Database Schema the "Generate DB Schema: Connect to Database" dialog window is displayed with the following defaults: 1. "DataNode Connection Info" the User Name and Password can only be changed for one pass. The changes do not persist. This seems to be a problems only for the default "DataNode Connection info and does not affect the "Local DataSources" stored via "Edit Preferences" dialog window and selectable in the dialog drop-down list. My recommendation is that the default datasource should be the last datasource selected (and not an arbitrary default). This pattern seems more intuitive. Joe From gregnicholson@example.org Mon Jun 08 10:21:38 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 10972 invoked from network); 8 Jun 2009 10:21:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Jun 2009 10:21:37 -0000 Received: (qmail 43449 invoked by uid 500); 8 Jun 2009 10:21:49 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 43423 invoked by uid 500); 8 Jun 2009 10:21:48 -0000 Mailing-List: contact gregnicholson@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:gregnicholson@example.org> List-Unsubscribe: <mailto:gregnicholson@example.org> List-Post: <mailto:gregnicholson@example.org> List-Id: <user.cayenne.apache.org> Reply-To: gregnicholson@example.org Delivered-To: mailing list gregnicholson@example.org Received: (qmail 43413 invoked by uid 99); 8 Jun 2009 10:21:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jun 2009 10:21:48 +0000 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: local policy) Received: from [83.161.120.155] (HELO vorsha.objectstyle.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 08 Jun 2009 10:21:40 +0000 Received: (qmail 31351 invoked from network); 8 Jun 2009 10:21:15 -0000 Received: from unknown (HELO ?IPv888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4:1?) (83.161.120.155) by localhost with SMTP; 8 Jun 2009 10:21:15 -0000 Message-Id: <gregnicholson@example.org> From: Andrus Adamchik <gregnicholson@example.org> To: gregnicholson@example.org In-Reply-To: <gregnicholson@example.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: Configuring Caching 3.0M6 Date: Mon, 8 Jun 2009 13:21:14 +0300 References: <gregnicholson@example.org> <gregnicholson@example.org> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org On Jun 6, 2009, at 9:22 PM, Joe Baldwin wrote: > Question: > In a JSP webapp scenario with sessions, it appears that each session > gets its own ObjectContext (via getThreadObjectContext()). If this > is true, then, for example with an ECommerce site with a Product > abstraction, if one user queries Cayenne for a list of Products, > and then a second user makes the identical request are there > ultimately two data objects created for each Product or just one > data object? > My expectation used to be that there was one data object for each > Product, but given my reading, it appears that there are two. If > there are two, and I really want just one, should I start > implementing some sort of query caching? It is up to you how you configure the context scope (application, session, request, or any other that makes sense in your app), and whether your app will or will not share the objects. Here is a bit of explanation on the common choices. Not sure if it will answer all your questions, but it seems like a needed prerequisite to this discussion. Each context has its own distinct set of objects (something you've observed), so users of different contexts will not see each other's changes until those are committed, and even worse, won't be able to edit the same uncommitted DataObjects in parallel (note that ObjectContext is thread safe, but DataObjects are not). In a read-only application (or read-only parts of the application) you can use a single shared ObjectContext (application scope). It will be thread-safe, fast and have a low memory footprint. If your application modifies data, you have to use dedicated contexts. The easiest scenario is one per session, however there are some variations. E.g. to improve concurrency and reduce memory use, you can use one context per request, or even one per single data modification. You can also combine a single shared "read-only" and dedicated read-write contexts created on the spot... Again, using a session context is a reasonable default, but from there you need to analyze your application needs and make a decision on an appropriate config. Andrus From gregnicholson@example.org Tue Jun 09 21:21:28 2009 Return-Path: <gregnicholson@example.org> Delivered-To: gregnicholson@example.org Received: (qmail 18254 invoked from network); 9 Jun 2009 21:21:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 9 Jun 2009 21:21:27 -0000 Received: (qmail 45875 invoked by uid 500); 9 Jun 2009 21:15:10 -0000 Delivered-To: gregnicholson@example.org Received: (qmail 45864 invoked by uid 500); 9 Jun 2009 21:15:10 -0000
{'source': 'Apache Software Foundation Public Mail Archives'}