title: NHibernate Connection Pooling
body: <p>I am considering using Fluent NHibernate for a new application with SQL Server 2008 and I am having trouble understanding the connection handling behavior I am seeing.</p>
  
  <p>I am monitoring connections using sp_who2 and here is what I see:</p>
  
  <ol>
  <li><p>When the SessionFactory is created, a single connection is opened.  This connection 
  seems to stay open until the app is killed.</p></li>
  <li><p>No connection is opened when a new session is opened.  (That's ok, I understand NHibernate waits until the last moment to create database connections).</p></li>
  <li><p>No new connection is opened even when I run a query through NHibernate.  I must assume it is using the connection created when the SessionFactory was created, which is still open.  I set a breakpoint after the query (before the session was closed), and no new sessions had appeared in sp_who.</p></li>
  </ol>
  
  <p>Running an entire app through a single connection is not acceptable (obviously).  <strong>How can I ensure each ISession gets its own connection?</strong>  I'm sure there's something obvious I'm missing here...</p>
  
  <p>Thanks in advance.</p>