Spring.Data.NHibernate12:::Application not closing database connection(Getting max connection pool
- by anupam3m
Even after successful transaction.Application connection with the database persist.in
Nhibernate log it shows Nhibernate Log
2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null) -
executing flush
2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.ConnectionManager [(null)] <
(null) - registering flush begin
2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.ConnectionManager [(null)] <
(null) - registering flush end
2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null) -
post flush
2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null) -
before transaction completion
2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.ConnectionManager [(null)] <
(null) - aggressively releasing database connection
2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Connection.ConnectionProvider
[(null)] <(null) - Closing connection
2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null) -
transaction completion
2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Transaction.AdoTransaction [(null)] <
(null) - running AdoTransaction.Dispose()
2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null) -
closing session
2010-05-21 14:45:08,428 [Worker] [0] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null) -
running BatcherImpl.Dispose(true)
Underneath given is my dataconfiguration file
<
?xml version="1.0" encoding="utf-8" ?
<
objects
xmlns="http://www.springframework.net"
xmlns:db="http://www.springframework.net/database"
xmlns:tx="http://www.springframework.net/tx">
<property name="CacheSettings" ref="CacheSettings"/>
type="Risco.Rsp.Ac.AMAC.CacheMgmt.Utilities.UpdateEntityCacheHelper,
Risco.Rsp.Ac.AMAC.CacheMgmt.Utilities" singleton="false"/
<
object type="Spring.Objects.Factory.Config.PropertyPlaceholderConfigurer, Spring.Core"
< property name="ConfigSections" value="databaseSettings"/
<
db:provider id="AMACDbProvider" provider="OracleClient-2.0"
connectionString="Data Source=RISCODEVDB;User ID=amacdevuser; Password=amacuser1234;"/>
<
object id="NHibernateSessionFactory"
type="Spring.Data.NHibernate.LocalSessionFactoryObject,Spring.Data.NHibernate12"
< property name="DbProvider" ref="AMACDbProvider"/
<value> Risco.Rsp.Ac.AMAC.CacheMappings</value>
</property>
<dictionary>
<
entry key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvider"
/>
<entry key="hibernate.dialect"
value="NHibernate.Dialect.Oracle9Dialect"/
value="NHibernate.Driver.OracleClientDriver"/
singleton="false"
<property name="SessionFactory"
ref="NHibernateSessionFactory" />
<property name="TemplateFlushMode" value="Auto" />
<property name="CacheQueries" value="true" />
<property name="EntityInterceptor" ref="AuditLogger"/>
type="Spring.Data.NHibernate.HibernateTransactionManager, >Spring.Data.NHibernate12">
<property name="DbProvider" ref="AMACDbProvider"/>
<property name="SessionFactory" ref="NHibernateSessionFactory"/>
<property name="EntityInterceptor" ref="AuditLogger"/>
type="Spring.Transaction.Interceptor.TransactionProxyFactoryObject,Spring.Data"
<property name="PlatformTransactionManager" ref="transactionManager"/>
<property name="Target" ref="EventPubSubDAO"/>
<property name="TransactionAttributes">
<name-values>
<add key="Save*" value="PROPAGATION_REQUIRES_NEW"/>
<add key="Delete*" value="PROPAGATION_REQUIRED"/>
</name-values>
</property>
type="Risco.Rsp.Ac.AMAC.DAO.EventPubSubMgmt.EventPubSubDAO,
Risco.Rsp.Ac.AMAC.DAO.EventPubSubMgmt"
<
/object
<
tx:attribute-driven/
<
/objects
Please help me out with this issue.Thanks