Hi,
A persistent class Product extends AbstractVersionedEntity which implements Lifecycle. I'd expect the methods onSave() and onUpdate() to be hit whenever the application saves or updates an instance, that's why I try to set an "edited" timestamp value among other values there.
Unfortunately, the methods never get executed. A short test program tells me:
Code:
boolean test = Lifecycle.class.isAssignableFrom(Product.class);
System.out.println("Result: " + test);
Result: true
What else needs to be implemented for the Lifecycle event handler to work as expected? I've read about the Interceptor Interface but this would spoil my application design, since the interceptor needs to be specified when the session is opened: The session is created by a class from a generic part of the portal application (servlet filter), and I'd like to avoid dependencies between the portal code and the actual entity model which belongs to separate package and project.