Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 27653 invoked from network); 6 Feb 2006 21:17:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Feb 2006 21:17:42 -0000 Received: (qmail 46182 invoked by uid 500); 6 Feb 2006 21:17:41 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 46170 invoked by uid 99); 6 Feb 2006 21:17:41 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 13:17:41 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=HTML_MESSAGE,MISSING_HEADERS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.36] (HELO brmea-mail-4.sun.com) (192.18.98.36) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 13:17:40 -0800 Received: from fe-amer-09.sun.com ([192.18.108.183]) by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id k16LHKuf020688 for ; Mon, 6 Feb 2006 14:17:20 -0700 (MST) Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) id <0IUA00701B29DS00@mail-amer.sun.com> (original mail from Craig.Russell@Sun.COM) for jdo-dev@db.apache.org; Mon, 06 Feb 2006 14:17:20 -0700 (MST) Received: from [129.146.30.241] by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPSA id <0IUA000K2B4VM200@mail-amer.sun.com> for jdo-dev@db.apache.org; Mon, 06 Feb 2006 14:17:20 -0700 (MST) Date: Mon, 06 Feb 2006 13:17:13 -0800 From: Craig L Russell Subject: Re: Cache invalidation In-reply-to: <43E32981.7010807@artnology.com> Sender: Craig.Russell@Sun.COM Cc: Apache JDO project , JDO Expert Group Message-id: <2F41D707-9441-4099-AFB0-1467018D7C53@Sun.COM> MIME-version: 1.0 X-Mailer: Apple Mail (2.746.2) Content-type: multipart/signed; protocol="application/pkcs7-signature"; boundary=Apple-Mail-257--107839115; micalg=sha1 References: <43E32981.7010807@artnology.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --Apple-Mail-257--107839115 Content-Type: multipart/alternative; boundary=Apple-Mail-256--107839663 --Apple-Mail-256--107839663 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Hi J=F6rg, Is this issue dead now? I looked at the javadoc for these methods and they all refer to oid =20 not pc. Thanks, Craig On Feb 3, 2006, at 1:59 AM, Joerg von Frantzius wrote: > Hello JDO developers, > > in our system we have several VMs that operate on the same database =20= > via JDO. We're performing distributed cache invalidation via our =20 > own notification mechanism, which effectively calls =20 > PMF.getDatastoreCache().evict() and PM.evict(). The problem here is =20= > that either evict() accepts only PC objects, not object ids, so we =20 > have to call PM.getObjectById() beforehand. If no object for that =20 > id was present, we're instantiating a hollow object here only to =20 > discard it afterwards, that's not very effective. > > As we really want cache invalidation here, not eviction, this is =20 > even worse. For this purpose, it would be far more convenient to =20 > have some method like invalidateCachesFor(Object id) on =20 > PersistenceManagerFactory. To make our wish complete ;) this method =20= > would transition all non-transactional instances to hollow for that =20= > id, for all the PMs the PMF has given out. All transactional =20 > objects with that id should be transitioned to hollow after their =20 > transaction has completed (either with commit or rollback). > > Or is there some other way to achieve the same effect? > > Thanks for any comments, > J=F6rg > > Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:Craig.Russell@sun.com P.S. A good JDO? O, Gasp! --Apple-Mail-256--107839663 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Hi=A0J=F6rg,

Is this issue dead = now?

I looked = at the javadoc for these methods and they all refer to oid not = pc.

Thanks,

Craig

On Feb 3, 2006, at 1:59 AM, Joerg von Frantzius wrote:

Hello = JDO developers,

in our system we have several VMs that operate = on the same database via JDO. We're performing distributed cache = invalidation via our own notification mechanism, which effectively calls = PMF.getDatastoreCache().evict() and PM.evict(). The = problem here is that either evict() accepts only PC objects, = not object ids, so we have to call PM.getObjectById() = beforehand. If no object for that id was present, we're instantiating a = hollow object here only to discard it afterwards, that's not very = effective.

As we really want cache invalidation here, not = eviction, this is even worse. For this purpose, it would be far more = convenient to have some method like invalidateCachesFor(Object = id) on PersistenceManagerFactory. To make our wish = complete ;) this method would transition all non-transactional instances = to hollow for that id, for all the PMs the PMF has given out. All = transactional objects with that id should be transitioned to hollow = after their transaction has completed (either with commit or = rollback).

Or is there some other way to achieve the same = effect?

Thanks for any comments,
J=F6rg


=

Craig Russell

Architect, Sun Java Enterprise System http://java.sun.com/products/jdo=

408 = 276-5638 mailto:Craig.Russell@sun.com

P.S. A = good JDO? O, Gasp!


= --Apple-Mail-256--107839663-- --Apple-Mail-257--107839115 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Disposition: attachment; filename=smime.p7s MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGUDCCAwkw ggJyoAMCAQICEB7Y7fLHmKoeHTUdbtYrvpAwDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA1MTIxNTIxNDc0NFoXDTA2MTIxNTIxNDc0 NFowbDEQMA4GA1UEBBMHUnVzc2VsbDEUMBIGA1UEKhMLQ3JhaWcgTGFpcmQxHD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