I am attempting to intercept the removal of entity beans. In certain cases, I would like not delete the entity from the database. I have a column that marks if an object is deleted. SO I would intercept the @PreRemove and sent the entity is deleted property. How can I make the system update the entity instead of removing it?
This is especially problematic when the entity is held in a collection by another entity.
You can"t do it as per the EJB3 spec but you can do that using an Hibernate interceptor