Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Restore and Save Session



    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:
http://lists.apple.com/mailman/options/webobjects-dev/mschrag% 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: http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden
References: 
 >Restore and Save Session (From: email@hidden)
 >Re: Restore and Save Session (From: Chuck Hill <email@hidden>)
 >Re: Restore and Save Session (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.