-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How do I assign an Interceptor AFTER a SessionFactory has be
PostPosted: Fri Sep 05, 2014 8:55 pm 
Newbie

Joined: Tue Sep 02, 2014 5:45 pm
Posts: 4
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.