title: Exception Could not open Hibernate Session for transaction
body: <p>Sometime i m getting this problem in my NHibernate log .My application stops at that moment.</p>
  
  <p>Updated wityh data configuration.</p>
  
  <p>Even after successful transaction.Application connection with the database persist.in </p>
  
  <p>Nhibernate log it shows</p>
  
  <p>Nhibernate Log</p>
  
  <blockquote>
    <p>2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl
    [(null)] &lt;(null)> - </p>
    
    <p>executing flush</p>
    
    <p>2010-05-21 14:45:08,428 [Worker] [0] DEBUG
    NHibernate.Impl.ConnectionManager [(null)] &lt;</p>
    
    <p>(null)> - registering flush begin</p>
    
    <p>2010-05-21 14:45:08,428 [Worker] [0] DEBUG
    NHibernate.Impl.ConnectionManager [(null)] &lt;</p>
    
    <p>(null)> - registering flush end</p>
    
    <p>2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl
    [(null)] &lt;(null)> - </p>
    
    <p>post flush</p>
    
    <p>2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl
    [(null)] &lt;(null)> -</p>
    
    <p>before transaction completion</p>
    
    <p>2010-05-21 14:45:08,428 [Worker] [0] DEBUG
    NHibernate.Impl.ConnectionManager [(null)] &lt;</p>
    
    <p>(null)> - aggressively releasing database connection</p>
    
    <p>2010-05-21 14:45:08,428 [Worker] [0] DEBUG
    NHibernate.Connection.ConnectionProvider </p>
    
    <p>[(null)] &lt;(null)> - Closing connection</p>
    
    <p>2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl
    [(null)] &lt;(null)> - </p>
    
    <p>transaction completion</p>
    
    <p>2010-05-21 14:45:08,428 [Worker] [0] DEBUG
    NHibernate.Transaction.AdoTransaction [(null)] &lt;</p>
    
    <p>(null)> - running AdoTransaction.Dispose()</p>
    
    <p>2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl
    [(null)] &lt;(null)> - </p>
    
    <p>closing session</p>
    
    <p>2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.BatcherImpl
    [(null)] &lt;(null)> - </p>
    
    <p>running BatcherImpl.Dispose(true)</p>
  </blockquote>
  
  <p>Underneath given is my dataconfiguration file   </p>
  
  <pre><code>   &lt;?xml version="1.0" encoding="utf-8" ?&gt;
  
  &lt;objects 
  xmlns="http://www.springframework.net" 
  
           xmlns:db="http://www.springframework.net/database"
  
       xmlns:tx="http://www.springframework.net/tx"&gt;
  
    &lt;object id="AuditLogger" type="Risco.Rsp.Ac.Audit.AuditLogger, Risco.Rsp.Ac.Audit" singleton="false"&gt; 
  
      &lt;property name="CacheSettings" ref="CacheSettings"  /&gt;
    &lt;/object&gt;
  
  
    &lt;object id="CacheSettings"
  
            type="Risco.Rsp.Ac.AMAC.CacheMgmt.Utilities.UpdateEntityCacheHelper, 
  
  Risco.Rsp.Ac.AMAC.CacheMgmt.Utilities" singleton="false"/&gt;
  
    &lt;!-- Property placeholder configurer for database settings--&gt;
  
    &lt;object type="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer, Spring.Core"&gt;
  
      &lt;property name="ConfigSections" value="databaseSettings"/&gt;
    &lt;/object&gt;
  
    &lt;db:provider id="AMACDbProvider"
  
                  provider="OracleClient-2.0"
  
      connectionString="Data Source=RISCODEVDB;User ID=amacdevuser; Password=amacuser1234;"/&gt;
  
    &lt;!-- For creating Factory objects --&gt;
    &lt;object id="NHibernateSessionFactory" 
  
    type="Spring.Data.NHibernate.LocalSessionFactoryObject,Spring.Data.NHibernate12"&gt;
  
      &lt;property name="DbProvider" ref="AMACDbProvider"/&gt;
  
      &lt;property name="MappingAssemblies"&gt;
        &lt;list&gt;
                &lt;value&gt;
      Risco.Rsp.Ac.AMAC.CacheMappings
  
         &lt;/value&gt;
  
        &lt;/list&gt;
  
      &lt;/property&gt;
  
      &lt;property name="HibernateProperties"&gt;
  
        &lt;dictionary&gt;
  
          &lt;entry key="hibernate.connection.provider"
  
                 value="NHibernate.Connection.DriverConnectionProvider"
           /&gt;
  
          &lt;entry key="hibernate.dialect"
  
                 value="NHibernate.Dialect.Oracle9Dialect"
                /&gt;
  
  
          &lt;entry key="hibernate.connection.driver_class"
  
  
                 value="NHibernate.Driver.OracleClientDriver"/&gt;
  
        &lt;/dictionary&gt;
  
  
      &lt;/property&gt;
  
    &lt;/object&gt;
  
  
    &lt;object id="HibernateTemplate" type="Spring.Data.NHibernate.HibernateTemplate"
  
  singleton="false"&gt;
  
      &lt;property name="SessionFactory"
  
   ref="NHibernateSessionFactory" /&gt;
  
      &lt;property name="TemplateFlushMode" 
  value="Auto" /&gt;
  
      &lt;property name="CacheQueries" value="true" /&gt;
  
      &lt;property name="EntityInterceptor" ref="AuditLogger"/&gt;
  
    &lt;/object&gt;
  
  
    &gt;&lt;object id="transactionManager" singleton="true"  
  
      type="Spring.Data.NHibernate.HibernateTransactionManager, &gt;Spring.Data.NHibernate12"&gt;  
  
      &lt;property name="DbProvider" ref="AMACDbProvider"/&gt;
  
      &lt;property name="SessionFactory" ref="NHibernateSessionFactory"/&gt;
  
      &lt;property name="EntityInterceptor" ref="AuditLogger"/&gt;
  
    &lt;/object&gt;
  
  
    &lt;object id="EventPubSubDAOTx" 
  
  type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject,Spring.Data"&gt;
  
      &lt;property name="PlatformTransactionManager" ref="transactionManager"/&gt;
  
      &lt;property name="Target" ref="EventPubSubDAO"/&gt;
  
      &lt;property name="TransactionAttributes"&gt;
         &lt;name-values&gt;
  
          &lt;add key="Save*" value="PROPAGATION_REQUIRES_NEW"/&gt;
  
          &lt;add key="Delete*" value="PROPAGATION_REQUIRED"/&gt;
  
        &lt;/name-values&gt;
  
      &lt;/property&gt;
  
    &lt;/object&gt;
  
  
    &lt;object id="EventPubSubDAO"  
  
      type="Risco.Rsp.Ac.AMAC.DAO.EventPubSubMgmt.EventPubSubDAO, 
  
     Risco.Rsp.Ac.AMAC.DAO.EventPubSubMgmt"&gt;
  
      &lt;property name="HibernateTemplate" ref="HibernateTemplate" /&gt;
  
      &lt;property name="SessionFactory" ref="NHibernateSessionFactory"/&gt;
  
    &lt;/object&gt;
  
    &lt;!-- EventPubSubMgmt DAO --&gt;
  
  
    &lt;tx:attribute-driven/&gt;
  
    &lt;/objects&gt;
  </code></pre>
  
  <p>Please help me out with this issue.Thanks </p>