-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Connection leak with NHibernate 2.1.2 on 64bit IIS.
PostPosted: Mon Apr 18, 2011 11:20 am 
Newbie

Joined: Mon Jan 23, 2006 11:44 pm
Posts: 15
Location: New Jersey, US
Hi,

I have a site that use many native SQL queries like the following:

DAO.GetMyList()
{
string sql = "select dto_columns from tablea";
IQuery query = Session.CreateSQLQuery(sql).SetResultTransformer(Transformers.AliasToBean<InspectionDTO>());
return query.List<dto>();
}

When I run this site in my developement environment which is 32 bits developement IIS in VS 2010, everything is fine. However, when I deploy this to a IIS 7.5 site 64bits ASP.NET 4.0, connections are never return to pool.

Btw, I am using Session Per Request pattern to manage NHibernate sessions.

Is this a known issue? or did I miss any necessary code? or should I upgrade to NHibernate 3.1?

Thanks for any possible help!

HZ


Top
 Profile  
 
 Post subject: Re: Connection leak with NHibernate 2.1.2 on 64bit IIS.
PostPosted: Mon Apr 18, 2011 1:56 pm 
Newbie

Joined: Mon Jan 23, 2006 11:44 pm
Posts: 15
Location: New Jersey, US
I have figured out the cause. My Session par Request httpmodules was not activated in IIS 7.x due to a web.config change in IIS 7.x. Therefore, the end_request event handler was never called so the Session.close was not called.

Anyway, hope this helps others who may experience the same problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.