tags:

views:

27

answers:

2

Hi,

We have created one application using Silverlight and NHibernate. and SOA architecture is used.

When i run the application, it creates NHibernate sessions, which i can see in the sqlserver Activity Monitor. But after completion of the transaction still that session is not going to be closed [i can see session in sleep mode]. it closes after something 5-10 min later [ByDefault].

we are using NHibernateDataContext object. before start of the business action, call the EnlistTransaction and afer completion it calls CompleteTransaction. But still i can see sleep session in the Sql server activity monitor.

Can anyone have any idea about it to resolve the issue?

Thanks in advance, Mahesh

A: 

You need to use something like NHibernate Profiler or SQL Profiler to see in more detail what statements are executing against your database. Most likely the transaction is being committed as you expect but the connection is being held open because of connection-pooling.

joshperry
A: 

Hi joshperry,

Thanks for your quick response.

As we are using NHibernate, it supports multiple database. currently we are supporting SQL server and Oracle. So i need to find a solution that is compatible to all other databases.

Can you have any idea how to resolve this issue?

Thanks, Mahesh

Mahesh