Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 64756 invoked from network); 17 Oct 2010 16:06:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Oct 2010 16:06:44 -0000 Received: (qmail 22488 invoked by uid 500); 17 Oct 2010 16:06:44 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 22441 invoked by uid 500); 17 Oct 2010 16:06:43 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 22433 invoked by uid 99); 17 Oct 2010 16:06:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Oct 2010 16:06:43 +0000 X-ASF-Spam-Status: No, hits=3.5 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of michael.d.dick@gmail.com designates 209.85.213.174 as permitted sender) Received: from [209.85.213.174] (HELO mail-yx0-f174.google.com) (209.85.213.174) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Oct 2010 16:06:38 +0000 Received: by yxm8 with SMTP id 8so22638yxm.33 for ; Sun, 17 Oct 2010 09:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=+5+h/y5oBnWLxU4yau7Y0zhXWSCyfVIvYpnOctOq4f8=; b=s8oelfZ7KQtgv6Tj6srPNpuJXrN+u4IhTpJoPlKRhAh5cTAPpbwFo5112nxXBqwIxs n9DJRHNUq4tSyYyLjEPv78x8lthDOPTrOLZ3jPbPb3GQhQuVClaotDDQwgdSDXBL0KJt mTwLz6T/xiDe77ybj3KUe6Z/y9UEaXjLc3ofA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=UMLBvMxpbvCk8/OrnRQhjlUusHa0NrLT+n9Yn8x0WhxfwGKGlmxGbjqCfMK3gYj7Wi VXSLqixHg5z66tFxxk5oh6oeEqVFWufNRxxJr7Cm9lBItjhY3thnZud12xfP09Q24P3K jrO79guOiR0LEj5hZis4BaRXpKdCWvCLFc7dw= Received: by 10.90.114.9 with SMTP id m9mr591364agc.158.1287331577021; Sun, 17 Oct 2010 09:06:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.65.11 with HTTP; Sun, 17 Oct 2010 09:05:56 -0700 (PDT) In-Reply-To: <1287298948809-5643780.post@n2.nabble.com> References: <1287170973720-5640165.post@n2.nabble.com> <1287298948809-5643780.post@n2.nabble.com> From: Michael Dick Date: Sun, 17 Oct 2010 11:05:56 -0500 Message-ID: Subject: Re: OpenJPA Questions To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=0016361e872c5b45900492d23d11 --0016361e872c5b45900492d23d11 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Sun, Oct 17, 2010 at 2:02 AM, brian.fed7 wrote: > > Thank you Michael for all the timely help. > > > Michael Dick wrote: > > > > Looks like we're inspecting the existing schema information. Seems like= a > > lot of calls, but I haven't run with DB2 in a while. Which version and > > platform of DB2 are you using? > > > I am using DB2 v9.5.0.808 > Windows, Linux or Unix? The SQL matches what we'd use for DB2 on one of those OSes, we use different SQL for DB2 on z/os or i/os though. How many EntityManagers and EntityManagerFactories does your application create? > Michael Dick wrote: > > > > Correct. There are some preconditions, like the entities need to be in > one > > of the JPA supported locations in the application, but in general your > > entities will be enhanced by the container automatically. > > > I did not understand when you say "There are some preconditions, like the > entities need to be in one > of the JPA supported locations in the application". Could you please > articulate? The container will look for entities in certain locations in an EAR. The details can be found in section 8.2 of the JPA 2.0 specification, here's a quick cut and paste of the highlights: A persistence unit may be packaged within one or more jar files contained within a WAR or EAR, as a set of classes within an EJB-JAR file or in the WAR classes directory, or a= s a combination of these as defined below. A persistence unit is defined by a persistence.xml file. The jar file or directory whose META-INF directory contains the persistence.xml file is termed the root of the persistence unit. In Java EE environments, the root of a persistence unit must be one of the following: =95 an EJB-JAR file =95 the WEB-INF/classes directory of a WAR file[80] =95 a jar file in the WEB-INF/lib directory of a WAR file =95 a jar file in the EAR library directory =95 an application client jar file If you've packaged the entity classes in some other location the container might not enhance them for you. The results may vary from application serve= r to application server - I'm not sure offhand what the rules are for WAS v7 though. I just wanted to mention it in case you happened to package the entities in a different location. Michael Dick wrote: > > > > Nit: WAS 7.0.x actually includes OpenJPA 1.2.x. Not a big deal, but it > > might > > save some confusion down the road > > > I did not understand when you say "Not a big deal, but it might > save some confusion down the road". Could you please articulate? WebSphere version 7.0 (without the JPA 2.0 Feature Pack) includes OpenJPA version 1.2. It doesn't include OpenJPA version 1.0. There are a couple of interesting differences between OpenJPA 1.0, and 1.2 (for example SQL statement batching). It sounds like you want to use JPA 2.0 though, so this isn't an issue for you. Just trying to save some confusion down the road if you went with a 'vanilla' WebSphere v7.0 install. > > > -- > View this message in context: > http://openjpa.208410.n2.nabble.com/OpenJPA-IBM-WAS-Some-basic-questions-= tp5640165p5643780.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > --0016361e872c5b45900492d23d11--