Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
-// $Id$
#include "WORequestHandler+private.h"
#include "WOApplication+private.h"
@end
#endif
+@interface WOApplication(Privates)
+- (void)_setCurrentContext:(WOContext *)_ctx;
+@end
+
@implementation WORequestHandler
static BOOL perflog = NO;
WOResponse *response = nil;
WOContext *context = nil;
NSThread *thread;
- NSMutableDictionary *threadDict;
NSString *sessionId = nil;
WOSession *session = nil;
NSString *uri;
thread = [NSThread currentThread];
NSAssert(thread, @"missing current thread ...");
- threadDict = [thread threadDictionary];
- NSAssert(threadDict, @"missing current thread's dictionary ...");
if (_request == nil) return nil;
/* setup context */
context = [WOContext contextWithRequest:_request];
NSAssert(context, @"no context assigned ..");
- NSAssert(threadDict, @"missing current thread's dictionary ...");
- [threadDict setObject:context forKey:@"WOContext"];
+ [app _setCurrentContext:context];
/* check session id */
*(&session) = nil;
}
NS_ENDHANDLER;
- NSAssert(threadDict, @"missing current thread's dictionary ...");
- [threadDict removeObjectForKey:@"WOContext"];
+ [app _setCurrentContext:nil];
}
#if USE_POOLS
[pool release]; pool = nil;