I have a JPA entity like this:
@SomeCDIInterceptorBinding
@Entity
public class Foo { ... }
Obviously the interceptor doesn't work, since JPA returns an entity instance and not the appropriate CDI proxy. So how do I get an instance of a CDI proxy of my entity, so that method calls invoke my interceptor?
This is specifically a 'how' question. There are other ways to solve my problem, but I want to know whether and how this specific thing is possible.
Answers appreciated.