-->
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: Getting the session connection from within the interceptor
PostPosted: Mon Feb 07, 2005 3:29 pm 
Newbie

Joined: Tue Dec 14, 2004 2:57 pm
Posts: 12
I'm trying to implement a history/logger interceptor where the log entries are applied in the same transaction as the changes. This is covered in previous posts.

How can I get a reference to the 'current' Session's connection from inside an Interceptor callback?

Obviously I could pass it in in the constructor, or a setter method, however these are not ideal. I would like to set this interceptor from the Configuration (nix the constructor), and not have to re-set the Session in the interceptor every time I open a new Session (nix the setter). Is there some why to get the controlling Session from the object? I've done my best to scour for forums, and I think I've read all the appropriate API docs, but I see no easy way to get the 'oldSession' from within Interceptor.onFlushDirty.

Thx,
--Ryan


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.