|Static Weaving and Lifecycle Methods [message #1827306]
||Tue, 12 May 2020 17:47
| Roland Welker
Registered: October 2013
I am using eclipselink (2.7.5) in a aws lambda project with a java 8 runtime. I have a utility class holding 2 life cycle methods (PrePersit and PreUpdate, annotated approprietly) which are than assigned via the entity listener annotation to a mapped superclass, updating create/modify dates and a soft delete flag.
This works all fine.
To improve performance I started using static weaving build with maven (de.empulse.eclipselink), Lazy Loading and Jackson JSON field filter to avoid a full entity tree being fetched and sent.
Once the static weaved lambda has been deployed, the EntityListener is still being invoked and sets the field values (I can see it in the objects after the persist/commit, however the values are not persisted to the database.
For testing purposed I have taken the weaving task back out and the values are showing up correctly in the db.
I have found a few related posts and one Eclipselink bug report going back to 1.x version, but no actual solution. I have also tried:
<property name="eclipselink.weaving.changetracking" value="false"/>
To see if this would make a difference without effect.
All entities, mapped super classes and Entity Listener are explicitly listed in the persistence.xml file.
Has anyone any solutions to use static weaving and Entity Listener successfully?
Thank you very much,
Powered by FUDForum
. Page generated in 0.02406 seconds