Re: Session Restoration
Re: Session Restoration
- Subject: Re: Session Restoration
- From: David Griffith <email@hidden>
- Date: Fri, 2 Sep 2005 20:19:15 +0200
Well fair enough, I have decided to scrap that idea as session
restoration seems to be a no-no. I'll just set robot sessions to
expire more quickly. Hopefully that will do the trick :-)
Regards,
David.
On 2 Sep 2005, at 20:05, Chuck Hill wrote:
On Sep 2, 2005, at 10:53 AM, David Griffith wrote:
HI all,
Can anyone tell me if this looks correct?
WOSession curSess = WOApplication.application
().restoreSessionWithID(recentSessionID, context());
It is extremely rare that you should need to do such a think.
I am calling this in the DirectAction.java class to attempt to
restore an existing session using an ID (recentSessionID) that I
know.
The intention was to avoid multiple sessions being created in a
certain situation. The recentSessionID exists already and was
recently created or if it does not exist it is handled differently.
You should not have to do this. You have a bug in your HTML.
However even though it does appear to use the Session ID that I
give it, a new session appears to be created with each connection
(according to the JavaMonitor at least).
Am I doing something wrong here?
Almost certainly. :-) I'd guess you have busted HTML which is
causing a new session to be created. Override dispatchRequest in
Application and log out the request.uri(). Then add this to the
session constructor:
NSLog.out.appendln(new RuntimeException("Session created"));
You should then be able to track the URI creating the second
session back to specific HTML in your page.
Chuck
--
Practical WebObjects - a book for intermediate WebObjects
developers who want to increase their overall knowledge of
WebObjects, or those who are trying to solve specific application
development 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