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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to