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