You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Christian Schneider (JIRA)" <ji...@apache.org> on 2014/12/04 09:10:12 UTC
[jira] [Resolved] (ARIES-1278) jpa persist visible outside its
transaction
[ https://issues.apache.org/jira/browse/ARIES-1278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Schneider resolved ARIES-1278.
----------------------------------------
Resolution: Fixed
The problem was that the DataSource did not correctly enlist as a resource in the TransactionManager. I did not use the correct classes of dbcp2.
The problem is fixed now in pax-jdbc-pool-dbcp2. For people not using pax-jdbc : Make sure you create a DataSource that wraps the XADataSource abd cares for pooling and enlistement of the resource.
If something is wrong in your DataSource then it will not work transactionally!
> jpa persist visible outside its transaction
> -------------------------------------------
>
> Key: ARIES-1278
> URL: https://issues.apache.org/jira/browse/ARIES-1278
> Project: Aries
> Issue Type: Bug
> Components: JPA
> Affects Versions: jpa-container-1.0.2, jpa-container-context-1.0.4
> Reporter: Christian Schneider
> Assignee: Christian Schneider
> Priority: Critical
>
> I have created a small example that shows the problem:
> https://github.com/cschneider/Karaf-Tutorial/tree/master/tasklist-cdi
> The project uses hibernate 4.3, aries jpa and derby.
> In persistence I work with container managed persistence provided by aries jpa.
> In persistence-emf I directly use the EntiryManagerFactory.
> In both cases I open a JTA transaction, then persist an entity. After a sleep I commit the transaction.
> In a separate thread I look for the number of entities. I would expect this number to be 0 until the transaction is committed. Unfortunately the persist is already shown while the transaction is still open.
> As it also happens with pure EMF the problem is maybe not in aries jpa directly as it is only quite thin then. Still I have no clue what might go wrong.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)