• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Session Restoration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Session Restoration


  • Subject: Re: Session Restoration
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 2 Sep 2005 11:05:54 -0700


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
  • Follow-Ups:
    • Re: Session Restoration
      • From: David Griffith <email@hidden>
References: 
 >Session Restoration (From: David Griffith <email@hidden>)

  • Prev by Date: Re: Abstract causes server exception
  • Next by Date: Capital letters ignored in password check
  • Previous by thread: Re: Session Restoration
  • Next by thread: Re: Session Restoration
  • Index(es):
    • Date
    • Thread