title: Interacting with the hibernate Session during event calls
body: <p>I want to write a history component that tracks changes to a particular object type and writes history rows based on the difference.  Note this is not a general audit system it is specific for one object type.</p>
  
  <p>I figure I can hook into the hibernate event model and listen for events that tells me when things have changed, watch for any changes to instances of the object type I am interested in, and then have some custom code generate the history rows.</p>
  
  <p>I want the history rows written in the same transaction, and ideally using hibernate (therefore using the same Session)</p>
  
  <p>I have some questions/concerns</p>
  
  <ul>
  <li>Which hibernate events should I hook, assuming I want to trap just changes?</li>
  <li>How do I go about participate in the same Session/transaction as the Session that are generating the events.  I have read there are issues interacting with the Session inside event handlers?</li>
  </ul>
  
  <p>Any help appreciated.</p>