You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Donald Woods (JIRA)" <ji...@apache.org> on 2010/02/19 19:52:27 UTC

[jira] Commented: (OPENJPA-969) In the JEE Environment a second datasource must be specified to create the OpenJPA sequence table

    [ https://issues.apache.org/jira/browse/OPENJPA-969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835884#action_12835884 ] 

Donald Woods commented on OPENJPA-969:
--------------------------------------

Haven't been able to recreate the hang, as I've been using Derby XA which has an issue as reported by another user - http://n2.nabble.com/Schema-generation-uses-auto-commit-mode-breaks-on-XA-data-sources-td4583095.html#a4583095


> 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-M2
>            Reporter: Fay Wang
>            Assignee: Donald Woods
>            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.