Re: How to Refuse New Sessions
Re: How to Refuse New Sessions
- Subject: Re: How to Refuse New Sessions
- From: Chuck Hill <email@hidden>
- Date: Wed, 5 Dec 2007 21:43:00 -0800
On Dec 5, 2007, at 12:42 PM, Andrew Lindesay wrote:
Hello;
I am a bit confused about "refuse new sessions". This works for
the built-in component request handler just fine, but for my own
request handler I don't think I fully understand the workings.
I have one instance for which I have "refuse new sessions" turned
on, but the instance is still running. If I start a new client
which is firing requests into the instance, it seems to accept and
process them as well as successfully create new sessions.
For this reason, I wonder if my request handler needs to detect if
the application is refusing new sessions and return some response
to the adaptor so that I knows to shift the request to another
instance?
Do anybody know how this should work?
Should? No, but I know how it does work. :-) If the request has an
instance number in it, the woadaptor will send it to the instance
without checking the "refuse new sessions" status. The assumption
is, I think, that if it has an instance number it has a session. If
there is no instance number in the request, then it will check the
"refuse new sessions" status and select an instance that is not
refusing (if there are any).
I think this makes sense, even if the adaptor checked the URL and
cookies for a session ID, it has no way of knowing if that is still a
valid session. In the past, I have checked for session creating DA
requests in dispatchRequest, stripped out the instance number and
returned a redirect to the altered URL. That works for direct
actions and provides an OK user experience. Perhaps your handler can
do something similar?
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