[jboss-jira] [JBoss JIRA] (WFLY-8954) Wildfly 10 with eclipselink Onscucess observer gets stale entity
Scott Marlow (JIRA)
issues at jboss.org
Thu Aug 17 09:16:02 EDT 2017
[ https://issues.jboss.org/browse/WFLY-8954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450797#comment-13450797 ]
Scott Marlow commented on WFLY-8954:
------------------------------------
Excellent progress! I think it would be better if you start with adding the test to upstream (current master), as that would be where we would want to merge the fix. To ensure that the issue is fixed in some future release. If you start a WildFly branch that is based on the master branch, I can try running that locally and when I have time, can try making the change that I suggested. I'm also fine with you making the code change as well, just not sure if I explained enough yet.
I didn't mention before, but one risk is that there could be some parts of EclipseLink that might need changing as well, to deal with the change that we are making. Specifically, we will be using [http://docs.oracle.com/javaee/5/api/javax/transaction/TransactionSynchronizationRegistry.html#registerInterposedSynchronization(javax.transaction.Synchronization)] instead of [http://docs.oracle.com/javaee/5/api/javax/transaction/Transaction.html#registerSynchronization(javax.transaction.Synchronization)]. If we later discover that there are any parts of EclipseLink that need adjustment, that will impact our effort. For now, we should continue forward with resolving this issue on the WildFly side.
[https://developer.jboss.org/wiki/HackingOnWildFly] may be useful to read as well.
> Wildfly 10 with eclipselink Onscucess observer gets stale entity
> ----------------------------------------------------------------
>
> Key: WFLY-8954
> URL: https://issues.jboss.org/browse/WFLY-8954
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 10.0.0.Final
> Reporter: Nuno Godinho de Matos
> Assignee: Scott Marlow
>
> Hi,
> In widlfly there seems to be an important issue concerning CDI events and observing these events during onsuccess. At least while using eclipselink.
> When using wildfly 10.0.0.Final together with eclipselink, if an application modifies an entity A, fires an event stating entity A has been modified, and an observer consumes this event during transaction success.
> Then the observer will be working with stale entities that do not reflect the modifications done to the entity.
> A sample application for this issue is available in:
> https://github.com/99sono/wildfly10-observe-on-success-stale-entity
> The widlfly configuration xml for the sample application, is available in the application itself, as can be seen in the readme documentation.
> Many thanks for taking a look.
> Kindest regards.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list