[Mono-dev] WCF: InstanceContextMode.PerSession

Atsushi Eno atsushieno at veritas-vos-liberabit.com
Tue Jan 11 01:07:54 EST 2011

Hi again,

To my understanding, a session (ISession) is usually member of 
ISessionChannel types, its lifecycle is bound to the channel, and we 
indeed have such implementation in TcpDuplexSessionChannel.

If we got to know .NET behaviors we'll do the same in WCF ;)

Atsushi Eno

(2011/01/10 0:03), Karsten Fourmont wrote:
> sigh: it seems no matter how long I wait before making a post to get 
> the details right, still every time something comes up minutes after I 
> hit the "send" button.
> So here's a small addition:
> It doesn't seem very well defined in the WCF documentation if an when 
> Dispose should be called on a service instance. Service classes don't 
> have to be IDisposable. But if they are, .NET invokes Dispose and I 
> think mono should do the same. However exactly "when" this dispose is 
> supposed to happen is not perfectly clear:
> http://msdn.microsoft.com/en-us/library/ms733040.aspx states:
> "In the default case, WCF recycles the service object and its context 
> after the session with which the service was associated is closed."
> So Dispose doesn't have to be called on session termination, but 
> (maybe?) on service channel termination on the server side. Whatever.
> The service instance just has to be able to find out when it should 
> free the session's resources once the session is closed either by the 
> client or by the server (like due to an inactivity timeout).
> Atsushi, I definitely don't envy you (or any of the mono team) for 
> having to implement something which is not properly specified. Only 
> Perl's "the implementation is the specification" seems worse ;-)
> Great work!
> Cheers,
>  Karsten

More information about the Mono-devel-list mailing list