openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-969) In the J2ee environment, when the sequence table is used for identity, if only one datasource is created, the application hangs.
Date Tue, 10 Mar 2009 18:54:50 GMT

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

Michael Dick commented on OPENJPA-969:
--------------------------------------

I should probably amend my earlier comments. I worked on this support for WebSphere. With
other Application Servers I tried to let us fall back to the existing support.

Part of the problem might lie in whether the application server uses the TransactionSynchronizationRegistry.
AFAIK the TSR does not support suspending the current transaction, so we need to write special
code to call vendor specific APIs. I added those for WebSphere, but they've never been added
for Geronimo or WebLogic, and other vendors. 

I talked with Fay and she's hitting the problem with WebSphere so I'm taking a closer look
at the issue. 

> In the J2ee environment, when the sequence table is used for identity, if only one datasource
is created, the application hangs. 
> ---------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-969
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-969
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 2.0.0
>            Reporter: Fay Wang
>            Assignee: Michael Dick
>
> 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.


Mime
View raw message