Hello,
We have a code base that uses the Hibernate implementation of JPA but that has to date only utilized the basic facilities of JPA. In particular that means we have used EntityManager instead of SessionBuilder. This approach was taken because (until now) we only needed the base JPA facilities and saw no benefit to using Hibernate constructs. However, we now need the facilities that a Hibernate Interceptor can provide and are looking for some way to implement this.
We see how to obtain the Session and SessionFactory from an existing EntityManager but cannot see how to "add" an Interceptor to an existing Session(Builder). We can find numerous examples showing how to configure a SessionFactory so that upon construction of the SessionFactory it will start up with an Interceptor but how can an Interceptor be added if (through the creation of an EntiryManager) the SessionFactor already exists?
Thank you.
|