Re: Restore and Save Session
Re: Restore and Save Session
- Subject: Re: Restore and Save Session
- From: Mike Schrag <email@hidden>
- Date: Wed, 30 Aug 2006 16:56:34 -0400
WOApplication application = WOApplication.application();
WOContext context = application.createContextForRequest(_request);
WOResponse response = application.createResponseInContext(context);
and if you "know" the session ID through some other mechanism than
normal you can call:
context._setRequestSessionID(sessionID);
then you can:
Session session = (Session)context.session();
try {
// handle your request
}
finally {
WOApplication.application().saveSessionForContext(context);
}
ms
On Aug 30, 2006, at 4:32 PM, email@hidden wrote:
Hello Chuck;
I am a little confused here as at (2) there is no context in which
to restore/save the session. I assume in the case of the component
request handler, the context is actually created at (2), but I am
creating a system that uses 'WOAction' so I assume the context must
be being created at (1) and thus I think the session restore and
save must be done at that point as well?
cheers.
I'm wondering, when one is writing a request handler, where
should the session restore and save be located?
1) WOAction.performActionNamed(...)
2) WORequestHandler.handleRequest(...)
Anybody know where Apple does this?
The second one. See page 167. ;-)
___
Andrew Lindesay
www.lindesay.co.nz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mdimension.com
This email sent to email@hidden
_______________________________________________
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