Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 95900 invoked from network); 10 Feb 2006 21:37:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Feb 2006 21:37:38 -0000 Received: (qmail 65726 invoked by uid 500); 10 Feb 2006 21:37:37 -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 65715 invoked by uid 99); 10 Feb 2006 21:37:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2006 13:37:37 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.31] (HELO brmea-mail-1.sun.com) (192.18.98.31) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2006 13:37:36 -0800 Received: from fe-amer-04.sun.com ([192.18.108.178]) by brmea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id k1ALbFSD000624 for ; Fri, 10 Feb 2006 14:37:15 -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 <0IUH00F01QJVZL00@mail-amer.sun.com> (original mail from Craig.Russell@Sun.COM) for jdo-dev@db.apache.org; Fri, 10 Feb 2006 14:37:15 -0700 (MST) Received: from [129.144.89.10] by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPSA id <0IUH0001WQQ3E810@mail-amer.sun.com> for jdo-dev@db.apache.org; Fri, 10 Feb 2006 14:37:15 -0700 (MST) Date: Fri, 10 Feb 2006 13:37:13 -0800 From: Craig L Russell Subject: Issue 158: Specification clarification 11.3 Sender: Craig.Russell@Sun.COM To: JDO Expert Group , Apache JDO project Message-id: <0D029DD4-CAA6-4673-BA97-5CB8FFC5164C@Sun.COM> MIME-version: 1.0 X-Mailer: Apple Mail (2.746.2) Content-type: multipart/signed; protocol="application/pkcs7-signature"; boundary=Apple-Mail-350-238960507; micalg=sha1 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --Apple-Mail-350-238960507 Content-Type: multipart/alternative; boundary=Apple-Mail-349-238959590 --Apple-Mail-349-238959590 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Javadogs, While reviewing the spec in some more detail prior to closing it for the release, I noticed that there is a corollary to the requirement that "after close(), all methods that actually do anything must throw exceptions. " So if a PM is closed and put back into the pool, it can never be given out again because it needs to be opened. This violates the requirement that after close, all methods throw exceptions. The problem can be avoided by using proxies (that are permanently closed by close()) and giving the proxies to the user. The proxies can be garbage collected and the proxied PersistenceManager can be put back into the pool when the proxy is closed. Take a look at this proposed clarification that describes PersistenceManagerFactory.getPersistenceManager. This method will never return the same instance as was returned bya previous invocation of the method. Note that this implies that pooled implementations must use proxies and not return the pooled instance directly from the pool. 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-349-238959590 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1
Javadogs,

While reviewing the spec in = some more detail prior to closing it for the release, I noticed that = there is a corollary to the requirement that=A0

"after close(), all methods = that actually do anything must throw exceptions. "

So if a PM is closed and = put back into the pool, it can never be given out again because it needs = to be opened. This violates the requirement that after close, all = methods throw exceptions.=A0

The problem can be avoided = by using proxies (that are permanently closed by close()) and giving the = proxies to the user. The proxies can be garbage collected and the = proxied PersistenceManager can be put back into the pool when the proxy = is closed.

Take= a look at this proposed clarification that describes = PersistenceManagerFactory.getPersistenceManager.

<proposed>
Th= is method will never return the same instance as was returned bya = previous invocation of the method. Note that this implies that pooled = implementations must use proxies and not return the pooled instance = directly from the pool.
</proposed>

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-349-238959590-- --Apple-Mail-350-238960507 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Disposition: attachment; filename=smime.p7s MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGUDCCAwkw ggJyoAMCAQICEB7Y7fLHmKoeHTUdbtYrvpAwDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA1MTIxNTIxNDc0NFoXDTA2MTIxNTIxNDc0 NFowbDEQMA4GA1UEBBMHUnVzc2VsbDEUMBIGA1UEKhMLQ3JhaWcgTGFpcmQxHDAaBgNVBAMTE0Ny YWlnIExhaXJkIFJ1c3NlbGwxJDAiBgkqhkiG9w0BCQEWFUNyYWlnLlJ1c3NlbGxAU3VuLkNPTTCC ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMXXgEAm88nu8cFbxXSWqTq+GaYpCx/0QSom 8kBbVxpJIURuO4ErLDupeXu6y9+5e7ZKLbeSQE5xbfYPcQR/IhqmYKy5YqRcuzPXREBj2zKEkZph pNXWpHgMdx9W8dq0Cu2i9Ux/S6c2MuEHrP6gfGGll+b/mzLoO280QHTuE4pcpKntRnwZdGxQ/5l8 IL+eLP+jpJAbYW9C+KNKofZtS6V6R0uzlqTOsEdZvwxZQ4mmPgHoz1+Gjwme/PC5sKvF09MaJDiI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