title: NHibernate 3 session state after rollback()
body: <p>I have a problem.</p>
  
  <pre><code>using (var tran = repository.Session.BeginTransaction())
  {
      try
      {
          repository.Save(entity);
          tran.Comit();
      }
      catch(Exception)
      {
          tran.Rollback();
          throw;
      }    
  }
  
  using (var tran = repository.Session.BeginTransaction())
  {
      try
      {
          repository.GetById(id);
          tran.Comit();
      }
      catch(Exception)
      {
          tran.Rollback();
          throw;
      }    
  }
  </code></pre>
  
  <p>When I try to get an entity by ID after exception and <code>tran.rollback()</code> in the first <code>using</code> block, I get an update exception. So NHibernate is trying to update the entity from the first <code>using</code> block in the second <code>using</code> block.</p>
  
  <p>Why? I did the <code>tran.Rollback()</code>. Must I do <code>Session.Clear()</code>, too?</p>