-->
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.  [ 3 posts ] 
Author Message
 Post subject: Regarding Webservice, NHibernate and their sessions
PostPosted: Wed Jan 10, 2007 4:14 am 
Newbie

Joined: Wed Jan 03, 2007 12:20 pm
Posts: 3
Hello,

I'm trying to make a "clean" webservice, using Nhibernate. I'm facing
some issues, but i'm quite the beginner with that kind of system. When
there are more than 2 clients connected on my webservice, i get
errors. It seems that the connection is dropped. Here is what i get
in theWinforms application using the Webservice :
Quote:
Error = {"The underlying connection was closed: An unexpected error occurred
on a receive."}


and sometimes :

Quote:
[System.Net.WebException] = {"The request failed with HTTP status 403:
Access Forbidden."}


In my webservices, I don't catch any exceptions.

My webservice is working like this : for each "Webservice" session I have,
I create a "NHibernate" session. Is it a good approach ? And when the
users are disconnecting from my webservice without warning, does the
garbage collector manage the "ghost" Nhibernate sessions ?

I also have a static class that manages a static ISessionFactory, and that's
the class I use to create new NHibernate sessions for new connected
users. Is this correct too ?

Thanks in advance :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 12, 2007 7:43 am 
Newbie

Joined: Wed Jan 03, 2007 12:20 pm
Posts: 3
No ideas ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 12, 2007 6:55 pm 
Contributor
Contributor

Joined: Sat Sep 24, 2005 11:25 am
Posts: 198
The problems that you describe are client-side issues, not related to NHibernate.

In general, I wouldn't recommend tying NHibernate session to the user asp.net session - Session Per Request is the recommended model


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.