Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 11659 invoked from network); 20 Apr 2010 13:54:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Apr 2010 13:54:49 -0000 Received: (qmail 23400 invoked by uid 500); 20 Apr 2010 13:54:49 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 23352 invoked by uid 500); 20 Apr 2010 13:54:48 -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 23344 invoked by uid 99); 20 Apr 2010 13:54:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Apr 2010 13:54:48 +0000 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=AWL,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of curtisr7@gmail.com designates 209.85.217.227 as permitted sender) Received: from [209.85.217.227] (HELO mail-gx0-f227.google.com) (209.85.217.227) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Apr 2010 13:54:43 +0000 Received: by gxk27 with SMTP id 27so5820460gxk.1 for ; Tue, 20 Apr 2010 06:54:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=H/uNhxjHPkL1wX61dBN58f/B/N1rx+4OuKq+uT6K15s=; b=eioU+O7w+VK2ZneHLwODTiYfDtoqqV23vCZHB/0Yd/339D7EUWtV+rPnKl6Er57Vut v1foXd0XzmjTcmw924Ih3zA92t95ZEVujhdskyB2TIpfhSsMRnAe3xK5x2n3s7YKrgoG YCkux2jADAVcYWeU3SUKEDO7JJL9lpSwXzuN0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=rATjgj5TH8pKI6uImBVHYAVMmvTP6Z4akCMhDCQ5GsIqtvZ0X4EVpVeqc2W7u//8Y9 i3A7kszFcqcoashr+bo1McGOpgvTOnj0ZWrk1cTBPfd6uUIz0rnBtWevT8L64DaCWwML Z8YnC1Nq0ch/XR8bC4XKO64f511bdGpQYTa/k= MIME-Version: 1.0 Received: by 10.151.106.21 with HTTP; Tue, 20 Apr 2010 06:54:22 -0700 (PDT) In-Reply-To: <1271755942291-4930234.post@n2.nabble.com> References: <1271755942291-4930234.post@n2.nabble.com> Date: Tue, 20 Apr 2010 08:54:22 -0500 Received: by 10.150.114.2 with SMTP id m2mr7201292ybc.327.1271771662705; Tue, 20 Apr 2010 06:54:22 -0700 (PDT) Message-ID: Subject: Re: OpenJPA without jta-data-source in persistence xml From: Rick Curtis To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=000e0cd48bc630e4690484ab6a7b --000e0cd48bc630e4690484ab6a7b Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Per the JPA 1.0 spec: "The transaction-type attribute is used to specify whether the entity managers provided by the entity manager factory for the persistence unit must be JTA entity managers or resource-local entity managers. The value of this element is JTA or RESOURCE_LOCAL. A transaction-type of JTA assumes that a JTA data source will be provided=97either as specified by th= e jta-data-source element or provided by the container. In general, in Java EE environments, a transaction-type of RESOURCE_LOCAL assumes that a non-JTA datasource will be provided. In a Jav= a EE environment, if this element is not specified, the default is JTA. In a Java SE environment= , if this element is not specified, a default of RESOURCE_LOCAL may be assumed." Although I can't say for certain whether or not OpenJPA tries to do something tricky to allow this. Maybe someone else on the list will have more info. --=20 Thanks, Rick On Tue, Apr 20, 2010 at 4:32 AM, BenBrott wrote= : > > I have not been able to make OpenJPA 1.2 work in Glassfish 2.1.1 without > having a jta-data-source referenced in persistencexml. So this > persistence.xml does not work because of no jta-datasource (default > datasource in Glassfish is used instead of my setup): > > > > > org.apache.openjpa.persistence.PersistenceProviderImpl > domain.Player > domain.Account > > value=3D"jdbc:jtds:sqlserver://localhost:1433/DB1" /> > value=3D"net.sourceforge.jtds.jdbc.Driver" /> > value=3D"DB1" /> > value=3D"DB1" /> > > > > > This works better: > > > > org.apache.openjpa.persistence.PersistenceProviderImpl > DB1_Datasource > domain.Player > domain.Account > > > > > > So I am trying to use container managed transactions from EJB3 stateless > beans using OpenJPA as persistence provider. The reason why I try to use > the > openjpa.ConnectionURL configuration is because I want to use Slice in > OpenJPA. > -- > View this message in context: > http://n2.nabble.com/OpenJPA-without-jta-data-source-in-persistence-xml-t= p4930234p4930234.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > --000e0cd48bc630e4690484ab6a7b--