Hey Antonio,

2011/9/19 Antonio Mancina <[email protected]>:
> Here some issues arise. In my application there are several
> reasons for having a modal dialog windows on top, providing
> the user with some feedbacks about the ongoing process.
> I've just noticed that if a user closes the Wt application
> browser tab (I use google chrome) the session is not released
> until it expires due to timeout. This implies that, in
> case the user repeats this many times, the thread pool is
> exhausted and the wt system does not serve any more
> user requests. Everything works fine with no modal dialogs
> shown on screen: as soon as the user closes the tab, the
> wt server detects this event and properly deallocates the
> session without waiting for the timeout to expire.

You actually see a difference in the same browser with a dialog open
or not for the session to be released? Then that is a bug.

> Even worse, in firefox, closing a tab even in non-modal con-
> ditions does not _always_ leads to a session closure.
> I don't know when and why this happens, but from a certain
> moment on, four different users issuing firefox requests (v. 5
> and v. 6.0.2) did not happen to imply a session deallocation,
> while a chrome request did.

No, you can't simply rely this event since it isn't specified how
browsers should deal with pending ajax requests while closing the
window. Therefore there is a "race condition" in the browser between
delivering the ajax request and closing the window, which is solved in
browsers in non-specified ways.

> 1) Is this "session closing in modal condition not corresponding
>    to an immediate session deallocation" an expected behaviour?

No. The fact that a modal dialog is open should not have an effect.
I'll try to reproduce this.

> 2) Is the firefox abnormal behaviour known and expected?

This is known behavior.

> 3) Also, would it be possible to detect thread pool exhaustion at
>    code-level, avoiding the user being stuck waiting for a timeout
>    to happen?

Actually, there is no reason to lock a thread while showing modal
dialogs. You can also show a modal dialog by using show(), and binding
listeners to its accept(), reject() or done() methods. The behavior is
the same, but it is a bit less convenient to implement.

Regards,
koen

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to