Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 32007 invoked from network); 17 Mar 2009 15:25:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Mar 2009 15:25:14 -0000 Received: (qmail 15335 invoked by uid 500); 17 Mar 2009 15:25:14 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 15306 invoked by uid 500); 17 Mar 2009 15:25:13 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 15294 invoked by uid 99); 17 Mar 2009 15:25:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2009 08:25:13 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2009 15:25:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 80289234C003 for ; Tue, 17 Mar 2009 08:24:50 -0700 (PDT) Message-ID: <704066650.1237303490510.JavaMail.jira@brutus> Date: Tue, 17 Mar 2009 08:24:50 -0700 (PDT) From: "Michael Dick (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-969) In the JEE Environment a second datasource must be specified to create the OpenJPA sequence table In-Reply-To: <1623584866.1236660650418.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-969?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Dick updated OPENJPA-969: --------------------------------- Priority: Minor (was: Major) Affects Version/s: 1.2.1 Issue Type: Improvement (was: Bug) Summary: In the JEE Environment a second datasource must be specified to create the OpenJPA sequence table (was: In the J2ee environment, when the sequence table is used for identity, if only one datasource is created, the application hangs. ) Upon further investigation this problem only exists if the sequence table doesn't exist and the application is relying on openjpa.jdbc.SynchronizeMappings to create the tables automatically. In that case the application requires a non-jta-data-source or openjpa.Connection2xxx properties in order to create the table. This was beyond the scope of the original enhancement to allow sequence values to be obtained without using a non-jta-data-source. > In the JEE Environment a second datasource must be specified to create the OpenJPA sequence table > ------------------------------------------------------------------------------------------------- > > Key: OPENJPA-969 > URL: https://issues.apache.org/jira/browse/OPENJPA-969 > Project: OpenJPA > Issue Type: Improvement > Components: jdbc > Affects Versions: 1.2.1, 2.0.0 > Reporter: Fay Wang > Assignee: Michael Dick > Priority: Minor > > The openjpa manual states clearly that a second unmanaged DataSource is required for updating sequence table (page 205: 4.2.1. Managed and XA DataSources): > "When using a managed DataSource, you should also configure a second unmanaged DataSource that OpenJPA can use to perform tasks that are independent of the global transaction. The most common of these tasks is updating the sequence table OpenJPA uses to generate unique primary key values for your datastore identity objects. Configure the second DataSource using the non-jta-data-source persistence.xml element, or OpenJPA's various "2" connection properties, such as openjpa.ConnectionFactory2Name or openjpa.Connection2DriverName. These properties are outlined in > Chapter 2, Configuration [161]." > Openjpa, however, does not this rule when Sequence table is involved. As a result, the application hangs when only one datasource is configured. This is not very user-friendly. An error message should be thrown when this situation is detected. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.