This content has been marked as final.
Show 3 replies
-
1. Re: EJB3 Interceptor never called - how to debug?
jc7442 Aug 10, 2007 3:12 AM (in response to tynor)For EJB entities:
Use @EntityListener annotation with @PrePersist, @PostPersist, @PreRemove
@PostRemove, @PreUpdate, @PostUpdate, @PostLoad
@Interceptors works fine for session bean and MDB. I'm not sure it is supposed to works for entity -
2. Re: EJB3 Interceptor never called - how to debug?
tynor Aug 10, 2007 8:35 AM (in response to tynor)Thanks - that's exactly right. It's unfortunate that there this disparity between the inteceptor/listener interfaces -- I'd planned to use the
the interceptor InvocationContext's contextData map to store some object-level state. I'll have to rethink since the EntityListener doesn't pass a context - only the entity Object.For EJB entities:
Use @EntityListener annotation with @PrePersist, @PostPersist, @PreRemove
@PostRemove, @PreUpdate, @PostUpdate, @PostLoad
@Interceptors works fine for session bean and MDB. I'm not sure it is supposed to works for entity -
3. Re: EJB3 Interceptor never called - how to debug?
jc7442 Aug 10, 2007 9:35 AM (in response to tynor)Hibernate interceptor are a little easier to use. But that's not EJB3, that's hibernate specific