[
https://issues.apache.org/jira/browse/GERONIMO-5824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13284281#comment-13284281
]
David Jencks commented on GERONIMO-5824:
----------------------------------------
Thanks for looking into this.
in the persistence.xml you can specify <jta-datasource> and
<non-jta-datasource>. In this case only the <non-jta-datasource> was
specified. However, the datasource configured there should have had
<no-transaction/> in its plan but had either
<local-transaction/>
or
<xa-transaction/>
Openjpa uses the non-jta-datasource for things like creating tables, getting
"sequence" values from tables outside a jta transaction, and similar things.
It uses the connection.commit style of local transaction management which
causes exceptions if the connection is already enrolled in an XA transaction
since it's from a transactional datasource.
If this is not enough information let me know.
> jpa JTA transaction and missing jta-data-source should be warned about or
> rejected
> ----------------------------------------------------------------------------------
>
> Key: GERONIMO-5824
> URL: https://issues.apache.org/jira/browse/GERONIMO-5824
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: persistence
> Affects Versions: 2.1.8, 2.2.2, 3.0
> Reporter: David Jencks
>
> Someone just had a lot of weird transaction errors that turned out to be
> because they had configured a persistence.xml with JTA transaction support
> and only a non-jta-datasource that was actually transactional. When both the
> tm and openjpa tried to control the tx confusion enused.
> We can detect this situation on deployment and either reject it or at least
> loudly warn about it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira