Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 2424 invoked from network); 24 Jan 2007 17:17:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jan 2007 17:17:05 -0000 Received: (qmail 23235 invoked by uid 500); 24 Jan 2007 17:17:12 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 23129 invoked by uid 500); 24 Jan 2007 17:17:11 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 23120 invoked by uid 99); 24 Jan 2007 17:17:11 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jan 2007 09:17:11 -0800 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=MAILTO_TO_SPAM_ADDR,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of plinskey@bea.com designates 66.248.192.21 as permitted sender) Received: from [66.248.192.21] (HELO usremg01.bea.com) (66.248.192.21) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jan 2007 09:17:03 -0800 Received: from usremr02.bea.com (usremr02.bea.com [10.160.29.92]) by usremg01.bea.com (Switch-3.2.2/Switch-3.2.2) with ESMTP id l0OHGWij001277 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 24 Jan 2007 09:16:41 -0800 Received: from repbex02.amer.bea.com (repbex02.bea.com [10.160.26.99]) by usremr02.bea.com (Switch-3.2.2/Switch-3.2.2) with ESMTP id l0OHGV74015721 for ; Wed, 24 Jan 2007 09:16:31 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Using query hints for mapping extensions in orm.xml Date: Wed, 24 Jan 2007 09:16:30 -0800 Message-ID: <7D856CDFE035FF45A0420ACBD71BDD6302F7123D@repbex02.amer.bea.com> In-Reply-To: <8e68c8e90701240838i6cc48b4fh288a46c53078efeb@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Using query hints for mapping extensions in orm.xml Thread-Index: Acc/1j573MBa1ZL+TmiP7t4tcGpFHgABLUqA References: <7D856CDFE035FF45A0420ACBD71BDD6302DB0EE3@repbex02.amer.bea.com> <5DA65C8D-B2A2-4A33-A2F7-9DCAD94EF7B5@SUN.com> <89c0c52c0701160612t70edc563m777b94d278a4aa44@mail.gmail.com> <82B77D6C-736F-4200-A500-6E60849C5280@apache.org> <89c0c52c0701180616q1dbd07c9rc18edb1aa77e6aa7@mail.gmail.com> <060A7895-CBBF-420B-B8BB-28E6B9E1B544@SUN.com> <8e68c8e90701230855s64d50debmae7dcb22e63c7095@mail.gmail.com> <89c0c52c0701240730q1ba554e2kc4439ef6abb2790b@mail.gmail.com> <8e68c8e90701240838i6cc48b4fh288a46c53078efeb@mail.gmail.com> From: "Patrick Linskey" To: X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.1.2.131432 X-Virus-Checked: Checked by ClamAV on apache.org Firstly, thanks for putting this together. I don't think that portability is a huge problem. I agree with the three scenarios that Albert mentioned, but I think that we can refine #1: > 1) if an application wants to be fully portable between providers, the > standard orm.xsd must be specified. This will inhibit the use=20 > of openjpa > features. I would revise this as follows: 1) if an application wants to be fully portable between providers, the standard orm.xsd must be specified. This will inhibit the use of OpenJPA features in that file, so a parallel openjpa-orm.xml file must be used which conforms to the OpenJPA XSD and adds the additional information. We could even create a second XSD for that situation that allows only OpenJPA content to help prevent people from putting conflicting stanzas in the two files. -Patrick --=20 Patrick Linskey BEA Systems, Inc.=20 _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.=20 > -----Original Message----- > From: Albert Lee [mailto:allee8285@gmail.com]=20 > Sent: Wednesday, January 24, 2007 8:38 AM > To: open-jpa-dev@incubator.apache.org > Subject: Re: Using query hints for mapping extensions in orm.xml >=20 > First, I would not expected other providers will handle the special > openjpa.orm.xsd even if it is spec'ed out in the document=20 > header. If they > choose to ignore the new schema and proceed to parse the=20 > document content > using the standard orm.xsd, then any openjpa specific stanza=20 > will probably > be flagged as non-compliance. >=20 > The other scenario is: what about if the document does not specify the > schema at all, like the original sample. I suspect most providers will > tolerate this scenario, just like openjpa does. >=20 > Can the solutions be: > 1) if an application wants to be fully portable between providers, the > standard orm.xsd must be specified. This will inhibit the use=20 > of openjpa > features. > 2) if an application wants to use openjpa specific stanza and=20 > still be used > by other provider, don't specify the schema at all in the=20 > document. Hoping > the other providers will tolerate and ignore the openjpa features. > 3) if an application wants to be openjpa schema compliance, then use > openjpa.orm.xsd in the document header and openjpa can validate the > document. However this will prevent the application to be=20 > portable to other > providers. >=20 > Albert Lee. >=20 >=20 > On 1/24/07, Kevin Sutter wrote: > > > > Thank you, Albert, for your experimentation. The updated schema > > definition > > (openjpa_orm_1_0.xsd) and the example openjpa_orm.xml seems=20 > to be what we > > are looking for. I guess the only concern is whether we=20 > can count on > > other > > JPA implementations to ignore this extra schema definition=20 > and just rely > > on > > the standard orm.xsd. > > > > Question: Even if other JPA providers are smart enough to=20 > ignore our > > specialized schema and use the standard JPA schema, what=20 > happens to our > > extension elements? Do they get ignored as well? Or, will the > > verification > > step still trip over these new/updated elements? > > > > Thanks again, > > Kevin > > > > > > On 1/23/07, Albert Lee wrote: > > > > > > Somehow the one of the attachment (openjpa_orm_1_0.xsd)=20 > from my previous > > > note did not make it to this forum. > > > > > > Try again here. > > > > >=20 > -------------------------------------------------------------- > -------------------------------- > > > > > > > > > > > > > > version=3D"1.0" > > > xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" > > > targetNamespace=3D"=20 > http://java.sun.com/xml/ns/persistence/orm" > > > =20 > xmlns:orm=3D"http://java.sun.com/xml/ns/persistence/orm" > > > elementFormDefault=3D"qualified" > > > attributeFormDefault=3D"unqualified" > > > > > > > > > > > > > > > > @(#)openjpa_orm_1_0.xsd 1.0 Jan 22 2007 > > > > > > > > > > > > > > > > > This is the XML Schema for extending the persistence > > > object-relational > > > mapping file for OpenJPA specific features. > > > > > > The file may be named "META-INF/orm.xml" in the persistence > > > archive or it may be named some other name which would be > > > used to locate the file as resource on the classpath. > > > > > > ]]> > > > > > > > > > > > > > http://java.sun.com/xml/ns/persistence/orm_1_0.xsd > > > "> > > > > > > > > > > > > > > > > > > > > > > > minOccurs=3D"0" maxOccurs=3D"1" default=3D"false"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > type=3D"xsd:boolean" > > > minOccurs=3D"0" maxOccurs=3D"1" default=3D"false"/> > > > > > > minOccurs=3D"0" > > > maxOccurs=3D"1" default=3D"parallel"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Albert Lee > > > > > > > >=20