Re: Swapping a session on a direct action
Re: Swapping a session on a direct action
- Subject: Re: Swapping a session on a direct action
- From: Chuck Hill <email@hidden>
- Date: Mon, 7 Apr 2008 07:11:33 -0700
On Apr 7, 2008, at 3:18 AM, Miguel Arroz wrote:
Hi!
We're having a problem with "zombie" sessions. One of our direct
actions has some trickery to always create a new session, even if
the wosid cookie has a valid session ID, and I believe something is
acting up there, but I can't figure out why (yes, this looks
strange, but we actually know what we are doing, or at least we like
to believe so).
The problem is this: everytime I access that DA, JavaMonitor shows
2 more sessions on that instance. After the typical 60 minutes, one
of the sessions dies, but the other remains forever. This has
obvious serious consequences, as Refuse New Sessions will wait for
every session to die, and those zombie sessions simply won't go away.
I have seen this happen when sleep() or terminate() throws an exception.
As I needed a more sophisticated way to track sessions (I need to
know the user login, etc) I built my own session tracker, that hooks
into session's sleep and termination methods to keep track of what's
going on. Looking at the table generated by that tracker, everything
is fine: no zombie sessions appear, and all the sessions die after
60 minutes.
So, to dig this further, what I want to know is where does that
active session counter on JavaMonitor comes from. How's that count
being made? Is it done on the app or on wotaskd?
See activeSessionsCount() in the WOApplication API.
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden