I am somewhat new to using JPA -- I'll put that out there right off the bat. I'm getting more familiar with it, but there are big holes in my knowledge right now.
I am working on an application that uses JPA, and deletes entities using the EntityManager.remove(Object entity) function. However, the application also links into a third-party application, and I would like to add logic that gets executed whenever a certain type of Entity is removed from the persistence layer.
My question is this. Is there a way to add logic to the EntityManager.remove(Object entity) function on a Entity class level, such that every time that type of entity is deleted the extra logic is executed?
Thanks much.