[jboss-jira] [JBoss JIRA] (WFLY-8954) Wildfly 10 with eclipselink Onscucess observer gets stale entity
Nuno Godinho de Matos (JIRA)
issues at jboss.org
Wed Jun 21 12:43:00 EDT 2017
[ https://issues.jboss.org/browse/WFLY-8954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13424896#comment-13424896 ]
Nuno Godinho de Matos commented on WFLY-8954:
---------------------------------------------
On wildfly 10.1.0.0.Final with eclipselink, the problem persists.
{panel}
2017-06-21 18:39:47,993 INFO [wildfly.bug.onsuccess.facade.ModifyEntityAndFireEventFacade] (default task-35) We will now modify the entity: db.model.SomeEntity at 4e2224a0 we will toogle the text to either true or false
2017-06-21 18:39:48,005 INFO [wildfly.bug.onsuccess.facade.AbstractSomeEntityChangeEventObserverFacade] (default task-35) START: TEST VALIDATION - FOR FIRED EVENT: wildfly.bug.onsuccess.event.SomeEntityChangeAEvent
2017-06-21 18:39:48,008 INFO [wildfly.bug.onsuccess.facade.AbstractSomeEntityChangeEventObserverFacade] (default task-35) Before Refresh value was: false, After Refresh: true. Value on entity passed by event object as new value was: true
2017-06-21 18:39:48,009 ERROR [wildfly.bug.onsuccess.facade.AbstractSomeEntityChangeEventObserverFacade] (default task-35) Wildfly ON_SUCCESS handling observing stale entity that does not match what transaction persisted. EntityMode before refresh: false And After Refresh: true For Equipment: 1
<---------------------- NOTE: here the code is detecting that entity is stale.
2017-06-21 18:39:48,009 INFO [wildfly.bug.onsuccess.facade.AbstractSomeEntityChangeEventObserverFacade] (default task-35) ENDED: TEST VALIDATION - FOR FIRED EVENT: wildfly.bug.onsuccess.event.SomeEntityChangeAEvent
{panel}
I will see what is the outcome when using hibernate.
The domain model should in this case be trivial enough to not have any problems switching the persistence provider.
> 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