@PreUpdate not called with AspectJ [message #540058] |
Mon, 14 June 2010 13:34  |
Eclipse User |
|
|
|
I am working on a project that is looking to replace Hibernate with EclipseLink, but we are running into a problem with AOP. The project is using the AspectJ compiler, and what we are finding is, for these compiled classes, EclipseLink does not call a @PreUpdate annotated method.
I have created a simple project that works OK if the standard compiler is used but fails if the AspectJ compiler is used and if I use the AspectJ compiler and then simply replace the problem class file with a class file compiled using the standard compiler then @PreUpdate annotated method is called. We have also not had any problems with Hibernate and AspectJ.
We are using EclipseLink 2.0.2 and AspectJ 1.6.8 with a Java 1.6 target
Not really sure what to do next so any thoughts on how we might resolve this would be most welcome?
Thanks,
John
|
|
|
|
Re: @PreUpdate not called with AspectJ [message #540878 is a reply to message #540058] |
Thu, 17 June 2010 10:24  |
Eclipse User |
|
|
|
Are you adding the @PreUpdate annotation using AspectJ, or is it in the original class file? What about the other annotations in the class, are they found?
It could be that AspectJ is stripping the annotations from the class file, can you access the annotation using reflection?
It might have something to do with weaving in EclipseLink, what happens if your turn weaving off?
As a workaround you could define an event listener in your orm.xml, or register one using a DescriptorCustomizer.
|
|
|
Powered by
FUDForum. Page generated in 0.25193 seconds