Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 43049 invoked from network); 27 May 2008 23:26:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 May 2008 23:26:40 -0000 Received: (qmail 29435 invoked by uid 500); 27 May 2008 23:26:35 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 29412 invoked by uid 500); 27 May 2008 23:26:35 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 29398 invoked by uid 99); 27 May 2008 23:26:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 May 2008 16:26:35 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.136.44.55] (HELO smtp110.prem.mail.sp1.yahoo.com) (98.136.44.55) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 27 May 2008 23:25:38 +0000 Received: (qmail 98389 invoked from network); 27 May 2008 23:25:59 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer; b=TTg4X6qumWAejCmjP+edwwMW5M8rVPTto5EfqXQVYmUnHA7geUZKbp7ujvGfdhRBag/6jxGr6yjAEiDpKu4ywCxUQZDVH65acMuYGiW8Hu5jielawnFLn72lspba8WuVE6rzXYuZQEv5fLFzpBsuyXgbuhm1d1UktTVYJXobqBI= ; Received: from unknown (HELO ?10.11.55.42?) (david_jencks@63.105.20.225 with plain) by smtp110.prem.mail.sp1.yahoo.com with SMTP; 27 May 2008 23:25:59 -0000 X-YMail-OSG: E0sOCgMVM1m8klDhQqovnovUvouN81WvHmELJWgO1DsomrhjbIoUEH39Hr9jFkCVhKIW9.6WsEysiTF6lrCUvGoyqotsCfBncABJlkfJfIoQLciiinWYw4vcuxg- X-Yahoo-Newman-Property: ymail-3 Message-Id: <88DA26C3-5794-4E20-87FA-E333445DDF07@yahoo.com> From: David Jencks To: user@geronimo.apache.org In-Reply-To: <17502079.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: JPA, entities and EJB3 Date: Tue, 27 May 2008 16:25:54 -0700 References: <17502079.post@talk.nabble.com> X-Mailer: Apple Mail (2.919.2) X-Virus-Checked: Checked by ClamAV on apache.org 1. I hope you named the file openejb-jar.xml 2. jta-datasource and non-jta-datasource have to contain the names of the datasources in the geronimo plan used for the pool, NOT some jndi name you might also map them to. The datasources don't need to be bound in jndi in order to be used for jpa 3. The non-jta-datasource must be a datasource that really has no transaction support, using the element instead of or ... in the connector plan. With derby I find it necessary to have a non-jta-datasource if any ddl is needed or if openjpa is generating the primary keys. I don't know if you can get away without one for other databases. If you want to experiment, leave out the non-jta-datasource rather than duplicating the jta-datasource contents. hope this helps david jencks On May 27, 2008, at 4:09 PM, zeros wrote: > > Good evening: > > I'm newbie with EJB3.0. I want to configure the persistence.xml > to have > entities managed with JPA. I have the next configuration files: > OPENJPA-JAR.XML > > xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1" > xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0" > xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1" > xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2"> > > > o2o.marketing > EJB > 1.0.8 > jar > > > > console.dbpool > marketing > 1.0 > rar > > > > > > And I have also persistence.xml > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/persistence > http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> > > Entity Beans for User > > org.apache.openjpa.persistence.PersistenceProviderImpl provider> > java:comp/env/marketing > java:comp/env/marketing > META-INF/orm.xml > > > > > The error which I'm having is the next one: Unable to resolve > reference > "JtaDataSourceWrapper" and Unable to resolve reference > "NonJtaDataSourceWrapper", which are basically the same error. > > I think this is produced because I'm not mapping the Datasocurce to > the > DBPool. Geronimo returns to me examples to do it for web, but no > example to > do it for an EJB. > > Please could you help me? > > WATCH OUT! I'm talking about entities and EJB3.0, not entiti beans and > EJB2.0 > > Thanks in advance > > SERGIO > -- > View this message in context: http://www.nabble.com/JPA%2C-entities-and-EJB3-tp17502079s134p17502079.html > Sent from the Apache Geronimo - Users mailing list archive at > Nabble.com. >