Re: Session Question
Re: Session Question
- Subject: Re: Session Question
- From: Chuck Hill <email@hidden>
- Date: Tue, 8 Feb 2005 15:29:04 -0800
1. Persistent Session Store. There is a LOT of data the session
references. Implementing this by serializing all those objects is
likely to result in utter failure. Implementing this by some short
hand method is likely to result in a massive amount of work.
2. The instance number _is_ stored in a cookie with the name of woinst.
chuck
On Feb 8, 2005, at 3:22 PM, Jean-François Veillette wrote:
My guess (not verified), is that if there is a cookie with a valid id,
then it will use it to access the valid and existing session.
Look at the generated cookies, maybe the cookie's path is defined like
"... WebObjects/Test.woa/" you are just missing the last '/' in the
url, causing the cookie to not match ? Log the cookies sent/received,
my first guess would be that the cookie is not sent.
Another reason why this could happen is related to instance number.
If you have more than one instance of the running app, then the wo
adaptor (the apache adaptor for example) would route a request to :
http://www.mydomain.com/cgi-bin/WebObjects/Test.woa
to a specific application instance, it's the adaptor's choice,
depending on load policy.
So a first request would give you the first application instance
(...Test.woa/1/wa/default) where a second hit to the same adress would
give you the next instance (...Test.woa/2/wa/default).
Obviously, if session are not shared, then even if the cookie is
there, the sessionID won't match a per instance session number, so you
will get a new session on your new app instance.
To work on this, look around :
1- persistent session store, so no mather which app instance you get,
your sessions are shared
2- work on the woadaptor, look for a way to have an application
instance number ( in the cookies, along with the session id ), so that
the adaptor will route the request to the same app instance.
- jfv
Le 05-02-08, à 16:26, Gerald Hanks a écrit :
I have an application called Test that I am developing. I can access
the app at http://www.mydomain.com/cgi-bin/WebObjects/Test.woa I have
the application set to store session ids in cookies. I can start a
session and everything works well until I leave the site and return.
If I return by back tracking my session is still active. If I return
using a direct action such as
http://www.mydomain.com/cgi-bin/WebObjects/Test.woa/wa/default then
my session is still active. If I return using the application url
http://www.mydomain.com/cgi-bin/WebObjects/Test.woa then a new
session is created and I lose all my session information.
Is this the way things are supposed to happen or am I doing something
wrong? How can I allow users to leave my webobjects application and
return without losing their sessions? My understanding was all I had
to do was to store the session ids in cookies.
--gerald
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net
This email sent to email@hidden
--
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