Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 23597 invoked from network); 11 Jan 2006 17:42:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Jan 2006 17:42:32 -0000 Received: (qmail 32694 invoked by uid 500); 11 Jan 2006 17:42:31 -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 32678 invoked by uid 99); 11 Jan 2006 17:42:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jan 2006 09:42:31 -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.36] (HELO brmea-mail-4.sun.com) (192.18.98.36) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jan 2006 09:42:29 -0800 Received: from fe-amer-06.sun.com ([192.18.108.180]) by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id k0BHg8uf000312 for ; Wed, 11 Jan 2006 10:42:08 -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 <0ISX00801VNMXD00@mail-amer.sun.com> (original mail from Craig.Russell@Sun.COM) for jdo-dev@db.apache.org; Wed, 11 Jan 2006 10:42:08 -0700 (MST) Received: from [129.145.133.119] by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPSA id <0ISX00EZIVU7JX40@mail-amer.sun.com>; Wed, 11 Jan 2006 10:42:08 -0700 (MST) Date: Wed, 11 Jan 2006 09:42:05 -0800 From: Craig L Russell Subject: Re: classloader for JDO classes In-reply-to: <1136971632.43c4cf70769b1@webmail.jpox.org> Sender: Craig.Russell@Sun.COM To: erik@jpox.org Cc: jdo-dev@db.apache.org, JDO Expert Group Message-id: <286C7CB5-E332-44EB-8377-4FDEC35316E6@Sun.COM> MIME-version: 1.0 X-Mailer: Apple Mail (2.746.2) Content-type: multipart/signed; protocol="application/pkcs7-signature"; boundary=Apple-Mail-535--219663445; micalg=sha1 References: <1136938162.43c44cb2ed519@webmail.jpox.org> <1136971632.43c4cf70769b1@webmail.jpox.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --Apple-Mail-535--219663445 Content-Type: multipart/alternative; boundary=Apple-Mail-534--219663991 --Apple-Mail-534--219663991 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi Erik, If your Employee is loaded by classloader 1 and your implementation is loaded by classloader 2 then the implementation won't work using the standard JDO 2 binary compatible contracts. Your implementation implements cl2.StateManager but the Employee expects cl1.StateManager. I don't see how it can work. Craig On Jan 11, 2006, at 1:27 AM, erik@jpox.org wrote: > Craig, > > We can make it work easily. We are able to verify by class name the > interfaces > implemented, but I wonder if there is some security restriction on > that. > > Regards, > > Erik Bengtson > > Quoting Craig L Russell : > >> Hi Erik, >> >> No, this is not ok. >> >> The problem is for example when the application calls >> pm.makePersistent(employee). If the jdoimpl does a check (if (! o >> instanceof PersistenceCapable) throw JDOUserException("Object was not >> enhanced");) then the different classes will be an issue. The >> PersistenceCapable in the 2nd jar is not the same class as in the 1st >> jar even though they have the same name. >> >> Have you tried it? >> >> Craig >> >> On Jan 10, 2006, at 4:09 PM, erik@jpox.org wrote: >> >>> >>> >>> Hi, >>> >>> An app has two classloaders, the 1st with jdoimpl.jar+jdo2.jar and >>> the 2nd with >>> persistent classes +jdo2.jar. >>> >>> The PCclass links to jdo2.jar(2) and the jdoImpl links to jdo2.jar >>> (1). I guess >>> that's ok, right? In any case, it may worth mentioning that in the >>> spec. >>> >>> Regards, >>> >>> Erik Bengtson >> >> 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! >> >> > > > 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-534--219663991 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=US-ASCII Hi Erik,

If your Employee is loaded = by classloader 1 and your implementation is loaded by classloader 2 then = the implementation won't work using the standard JDO 2 binary compatible = contracts.

Your= implementation implements cl2.StateManager but the Employee expects = cl1.StateManager. I don't see how it can work.

Craig

On Jan 11, 2006, at 1:27 AM, erik@jpox.org wrote:

Craig,

We can make it work easily. We = are able to verify by class name the interfaces
implemented, but I wonder if there is some security = restriction on that.
Regards,

Erik = Bengtson

Quoting Craig L Russell <Craig.Russell@Sun.COM>:
=

Hi Erik,

No, this = is not ok.

The problem is for example when the application = calls
pm.makePersistent(employee). If = the jdoimpl does a check (if (! o
instanceof = PersistenceCapable) throw JDOUserException("Object was not
enhanced");) then the different classes will be an = issue. The
PersistenceCapable in the 2nd = jar is not the same class as in the 1st
jar even = though they have the same name.

Have you tried it?


On Jan 10, 2006, at 4:09 PM, erik@jpox.org wrote:




An app has two classloaders, the 1st with = jdoimpl.jar+jdo2.jar and
the 2nd = with
persistent classes = +jdo2.jar.

The PCclass links to jdo2.jar(2) and the jdoImpl = links to jdo2.jar
(1). I guess
that's ok, right? In any case, it may worth = mentioning that in the
spec.


Erik Bengtson

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!





=

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-534--219663991-- --Apple-Mail-535--219663445 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 pj9SvZ4CTCgcDZV78J086YwlVbMC0VQotjhu1p42lr8CS33IXLz3OWNrDETCAepah/Dgw2ZZApQ9 9L0CAwEAAaMyMDAwIAYDVR0RBBkwF4EVQ3JhaWcuUnVzc2VsbEBTdW4uQ09NMAwGA1UdEwEB/wQC MAAwDQYJKoZIhvcNAQEEBQADgYEAKdIkgAWCg2Bi7ocnstfJA4iym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