• 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: When is a session restoration error noticed?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When is a session restoration error noticed?


  • Subject: Re: When is a session restoration error noticed?
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 29 Sep 2009 11:16:17 -0700


On Sep 29, 2009, at 6:20 AM, Robert Tupelo-Schneck wrote:

I think this is true: when you manually call terminate() on a session,
it doesn't actually terminate until the next time it goes to sleep.
So if you call terminate() on a session which isn't even awake, it
will go through one more whole request-response cycle successfully
without a session restoration error.

Tthe terminated session is not discarded until the Session Timeout Thread wakes up and notices that there are terminated sessions. Until that happens, other requests for the session will be accepted.



Am I likely to cause any harm terminating a session which isn't awake,

I can't think of any offhand, but I don't think this is intended either.


and then preventing it from one more request-response using this in my
Application:
@Override
public WOSession restoreSessionWithID(String sessionID, WOContext
wocontext) {
WOSession session = super.restoreSessionWithID(sessionID,wocontext);
if(session==null || session.isTerminating()) return null;
return session;
}


That is going to leave the terminated session checked out. I'd expect that it won't get discarded because of this and your app will not be able to gracefully shutdown for scheduling. You at least need to check it back in.
sessionStore().checkInSessionForContext(wocontext);


Chuck


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific 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


References: 
 >Re: When is a session restoration error noticed? (From: Robert Tupelo-Schneck <email@hidden>)

  • Prev by Date: Re: Error when extending from ERXAjaxApplication
  • Next by Date: [Reminder] The surveys
  • Previous by thread: Re: When is a session restoration error noticed?
  • Next by thread: D2W Edit Lists as shown in WOWODC 09 talk
  • Index(es):
    • Date
    • Thread