I Killed de Wabbit! I killed de Wabbit!

thanks Chuck multi instances working fine now.

On Mar 12, 2009, at 7:54 PM, Chuck Hill wrote:


On Mar 12, 2009, at 2:41 AM, Paul Stringer wrote:

Hi,

I'm experimenting with multiple instances using round robin. All is fine except that I'm seeing the session restoration error frequently when a user re-logs in after logging out from the app. I'm using Cookies to store the session information. What am I doing wrong, I presume the issue is that a session id that the user has in a cookie isn't valid when they get bounced from the login page because they're crossing instances?

Thanks

Paul S
Treasuremytext.com

<Queue Elmer Fudd singing "Kill da Wabbit! Kill da Wabbit!"/>

See below for how I kill the cookie to avoid this.

   /**
* Method to handle terminating session upon logout (forced or requested).
    */
public static void logout(com.webobjects.appserver.WOSession session, WOResponse response)
   {
/** require [valid_session] session != null; [valid_response] response != null; **/

// Try to avoid deadlock when multiple requests came in for a session that is getting terminated
       // Ajax components can cause this
session .setTimeOut (WOApplication .appProperties ().intPropertyForKey("SessionTerminateTimeOutInSeconds"));

// This prevents WO from returning a cookie from the soon to be expired session // and instructs the browser to discard the cookie that it has for the session
       session.setStoresIDsInCookies(false);
       if (response != null)
       {
WOCookie killSession = new WOCookie("wosid", ".", "/", null, 0, true);
           response.addCookie(killSession);
       }

       session.defaultEditingContext().revert();
   }


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

This email sent to [email protected]

Reply via email to