Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 82905 invoked from network); 9 Mar 2006 16:31:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Mar 2006 16:31:00 -0000 Received: (qmail 52553 invoked by uid 500); 9 Mar 2006 16:31:00 -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 52542 invoked by uid 99); 9 Mar 2006 16:31:00 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2006 08:31:00 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.43] (HELO brmea-mail-2.sun.com) (192.18.98.43) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2006 08:30:59 -0800 Received: from fe-amer-04.sun.com ([192.18.108.178]) by brmea-mail-2.sun.com (8.12.10/8.12.9) with ESMTP id k29GUc8u006492 for ; Thu, 9 Mar 2006 09:30:38 -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 <0IVV00L01C5TU400@mail-amer.sun.com> (original mail from Craig.Russell@Sun.COM) for jdo-dev@db.apache.org; Thu, 09 Mar 2006 09:30:38 -0700 (MST) Received: from [129.146.30.194] by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPSA id <0IVV00KJCCJ12450@mail-amer.sun.com> for jdo-dev@db.apache.org; Thu, 09 Mar 2006 09:30:37 -0700 (MST) Date: Thu, 09 Mar 2006 08:30:36 -0800 From: Craig L Russell Subject: Re: makePersistent detached instance deleted on database In-reply-to: <440FF8D5.30602@artnology.com> Sender: Craig.Russell@Sun.COM To: jdo-dev@db.apache.org Message-id: <8AEDB3E8-25D7-432F-A0C5-4667D3106C70@Sun.COM> MIME-version: 1.0 X-Mailer: Apple Mail (2.746.2) Content-type: multipart/signed; protocol="application/pkcs7-signature"; boundary=Apple-Mail-84-405879286; micalg=sha1 References: <1141830841.440ef4b90c5dd@webmail.jpox.org> <440F8E98.7060505@artnology.com> <440FF8D5.30602@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-84-405879286 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Hi J=F6rg, On Mar 9, 2006, at 1:43 AM, J=F6rg von Frantzius wrote: > Craig L Russell schrieb: >>> Also I find it confusing that the method most prominently used =20 >>> for inserting new objects shouldn't do so for detached instances. >> >> There is a bunch of history that you should look at, most of which =20= >> is in the jdo-dev archives. Bottom line, we used to have a =20 >> different API, attachCopy, but we looked at what it had to do for =20 >> transient and detached instances and decided that it wasn't worth =20 >> making a different API for attaching detached instances. > That particular behaviour of attachCopy() wasn't really specified, =20 > but it was pleasant JPOX-specific behaviour, if I remember =20 > correctly. I saw the discussion and I didn't see where inserting =20 > the instances would be forbidden by the spec, and still I don't see =20= > where it says that, especially in the light of 12.6.7. Please =20 > excuse my ignorance, where does it say that? These methods make transient instances persistent and apply detached =20 instance changes to the cache. ... For a detached instance, they locate or create a persistent instance with the same JDO identity as the detached instance, and =20 merge the persistent state of the detached instance into the persistent instance. Only the =20= state of persistent fields is merged. This means that if there is already a persistent instance in the =20 cache with the same object id as the detached instance, the detached =20 state will be merged. If there is not a persistent instance in the =20 cache, a cache instance is created and the detached state is merged =20 with the persistent instance. But there is no creation aspect of makePersistent on a detached =20 instance. Craig >> >> Regards, >> >> Craig >> >>>> >>>> Craig >>>> >>>> On Mar 8, 2006, at 7:14 AM, Erik Bengtson wrote: >>>> >>>>> >>>>> >>>>> Hi, >>>>> >>>>> What happens when we invoke makePersistent on a detached =20 >>>>> instance that was >>>>> deleted by another isolated process? I suspect that we raise an =20= >>>>> exception >>>>> instead of reinserting it for a second time. Is that right? >>>>> >>>>> Maybe this can be clarified in the spec. >>>>> >>>>> Regards, >>>> >>>> Craig Russell >>>> Architect, Sun Java Enterprise System http://java.sun.com/=20 >>>> products/jdo >>>> 408 276-5638 mailto:Craig.Russell@sun.com >>>> P.S. A good JDO? O, Gasp! >>>> >>> >>> >> >> Craig Russell >> Architect, Sun Java Enterprise System http://java.sun.com/products/=20= >> jdo >> 408 276-5638 mailto:Craig.Russell@sun.com >> P.S. A good JDO? O, Gasp! >> > 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-84-405879286 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Disposition: attachment; filename=smime.p7s MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGUDCCAwkw ggJyoAMCAQICEB7Y7fLHmKoeHTUdbtYrvpAwDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA1MTIxNTIxNDc0NFoXDTA2MTIxNTIxNDc0 NFowbDEQMA4GA1UEBBMHUnVzc2VsbDEUMBIGA1UEKhMLQ3JhaWcgTGFpcmQxHDAaBgNVBAMTE0Ny YWlnIExhaXJkIFJ1c3NlbGwxJDAiBgkqhkiG9w0BCQEWFUNyYWlnLlJ1c3NlbGxAU3VuLkNPTTCC ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBA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