Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 97335 invoked from network); 19 Apr 2007 15:03:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Apr 2007 15:03:20 -0000 Received: (qmail 82188 invoked by uid 500); 19 Apr 2007 15:03:26 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 82154 invoked by uid 500); 19 Apr 2007 15:03:26 -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 82145 invoked by uid 99); 19 Apr 2007 15:03:26 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2007 08:03:26 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [68.142.225.206] (HELO smtp108.rog.mail.re2.yahoo.com) (68.142.225.206) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 19 Apr 2007 08:03:19 -0700 Received: (qmail 96259 invoked from network); 19 Apr 2007 15:02:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:X-YMail-OSG:From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:X-MimeOLE:In-Reply-To:Thread-Index; b=3ceKp11Dbn9U5m4Eqm67TrWbItGRY/SqeQPiP1fHNkb47vU9I87jR7bcfb0oBTz6b+BE1KyS0VrxBayexylUPvBa7lw4Z4vx7UsyuhhI6TamuNGV9Qq+dlCJKAa7NMow4wAVTkeecQ7qp938IUIji99lOcBSXlOHa9jGQWBnglA= ; Received: from unknown (HELO tyan2400) (pjmoran@rogers.com@74.103.60.187 with login) by smtp108.rog.mail.re2.yahoo.com with SMTP; 19 Apr 2007 15:02:57 -0000 X-YMail-OSG: cqNcd0MVM1lCLe9l2KBZ.o.r30.ZTSn0KHwctCpn2Ni_I5I5rix3Ny_a4JSYvUV9UA-- From: "Phill Moran" To: , Subject: RE: Named query created in error Date: Thu, 19 Apr 2007 11:02:57 -0400 Message-ID: <033001c78293$d0ba6b70$6601a8c0@tyan2400> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 In-Reply-To: <1b5bfeb50704190756q7d451eb8vf946db8e4cb76156@mail.gmail.com> Thread-Index: AceCkwWn8eGVFBlBSlaUs8/vdDYVCAAAMWSQ X-Virus-Checked: Checked by ClamAV on apache.org Will do and thanks again -----Original Message----- From: eljotpl@gmail.com [mailto:eljotpl@gmail.com] On Behalf Of Jacek Laskowski Sent: April 19, 2007 10:57 AM To: open-jpa-dev@incubator.apache.org Subject: Re: Named query created in error On 4/19/07, Phill Moran wrote: > Thanks Jacek, > > Store is annotated with @Entity: That might imply an incorrect behaviour of OpenJPA. I doubt if I can help more than just a spec guidance ;-) I'll have to set up the environment to reproduce the issue as OpenJPA doesn't seem to fail with Derby and my simple test case. I hope someone from the OpenJPA team will chime in and provide some additional hints. > I thought I needed to add the class names to persistence.xml to have > them post-processed. What do you mean by "post-processed". There's no notion of "post-processing" in JPA. persistence.xml is a configuration file for persistence units (there can be more than one in a single persistence.xml file). Each and every PU is distinguished by its name (unique in the whole application). There's plenty of work to do for a jpa provider to set up a PU - see the spec's chapter 7. Container and Provider Contracts for Deployment and Bootstrapping. One of the tasks is to find all of the persistence classes (aka entities). Depending on your environment - Java SE or Java EE - the element may be required. The spec reads in "6.2.1.6 mapping-file, jar-file, class, exclude-unlisted-classes" page 138: A list of all named managed persistence classes must be specified in Java SE environments to insure portability. Portable Java SE applications should not rely on the other mechanisms described here to specify the managed persistence classes of a persistence unit. > I recognized (since using java agent right now) they are all looked at > for persistence candidacy but figured this would be needed for compile > time processing that I would switch to later. Let me know if I am way off here. That's another thing. To let a jpa provider manage persistence classes (entities) they might be enhanced at build- or run-time. It's a choice you make when you run your application. Under a heavy load every second might be of great value so the sooner the classes are enhanced the better or else it might incur performance penalty. With Java you can process classes while they're loaded and enhance them to add capabilities like manageability. > Also must I list all other classes in the > section or can I simply list add after my > listed classes. - Add and give it a go. You should see the Ignoring. warning message go away. > Clearly I am uncertain to the full purpose of this file persistence.xml? That's the most important file in the whole jpa application of yours so treat it gently and with great care so it won't cause troubles ;-) Read about it in the spec - 6.2 Persistence Unit Packaging page 134. It's easy to read so highly recommended to read (before you crash after struggling with setting up OpenJPA ;-)) Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl