[
https://issues.jboss.org/browse/WFLY-8954?page=com.atlassian.jira.plugin....
]
Nuno Godinho de Matos commented on WFLY-8954:
---------------------------------------------
Hi Scott,
I will try the sample application against the latest 10.1.0.Final build.
I would not be surprised that the issue lays somewhere in how ARUJA integrates with
eclipselink.
But what appears to be happening is that during the ONSUCCESS / ONCOMPELTION observation
of an event takes place at a moment in time where changes have been persisted into the
database, but the entity clones used by the unit of work have yet to be published to the
server session cache.
So this leads to many "interesting"/un-ince bugs.
From optimistic locking excpetions, if you try to modify the stale
entity you get out of the cache, to incorrect business logic if you let the business logic
run and it does not blow up and you did your work based on a stale entity.
So this one, is really a "mess" of a problem, in terms of possible
consequences.
I will try to test the sample application against the 10.1.0.Final.
And if that does not work, I will try to see about 10.0.0.Final with hibernate.
What I can confirm is that there is quite a difference of behavior between weblogic
transaction management (interceptors) and those in wildfly. Weblogic, will for intances,
open a new transaction context implicitly. THe code would not need to be flagged with
annotation transaction requires new. IN wildfly, in this scenario the transaction requires
new is absolutely need to not get errors stating we are trying to work without
transactional context.
In any case, i will report back to you on those two variables.
Kindest regards.
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)