I seem to be losing my session objects -- and my mind -- (but not the session itself).
With each request, I check for the existence of a Login object in the user's session. This works for a random amount of time, and then poof, the object is gone.
I know this so far -
The request.getSession(true) returns the same session as in previous requests. I know this because the session id is the dame, and isNew() is false.
session.getAttribute("login") returns null.
I don't know why I am losing the object and only the object.
Other things of note-
In my web.xml file I set the session-timeout to 3 hours. I lose the object after a few requests -- I don't see a
pattern in the number of requests before losing the object, and there is no pattern of time that I lose them after.
I do not implement java.io.Serializable in my Login object (which may be a cause, but I thought this was only for keeping object persistence through server shutdowns and crashes).
I also saw a message in the log regarding a FIleNotFoundException on SESSIONS.ser....
Any thoughts as to what is going on? Is my object in the session being garbage collected or something? Do I need to implement java.io.Serializable (I don't seem to need it when
testing on my PC)? If I am missing the SESSSIONS.ser file, is that my server admin's fault?
I hope someone can clear this confusion up for me.
Thanks in advance for any advice...