I'm creating a garbage collection service, you know the kind of thing I'm sure:
@Entity @EntityListeners({GarbageCollectorService.class}) public class MyEntity { .... }
@Service(objectName="pugwash:service=garbageCollector") @Management(GarbageCollectorManagement.class) public class GarbageCollectorService implements GarbageCollectorManagement { .... @PreRemove public void preRemove(final Object obj) { if (obj instanceof MyEntity) preRemove((MyEntity) obj); } ... }