Hello,

I'm calling session.getMaxInactiveInterval() on a session after it has
been invalidated.

Tomcat is throwing an IllegalStateException and saying that method
cannot be called on an invalid session.  However, the Servlet 2.3 API
docs do not state that IllegalStateException should be thrown (as it is
with many other methods in HttpSession) from getMaxInactiveInterval().

The reason I've run into this problem is because I'm trying to write a
HttpSessionAttributeListener that determines if the session is being
explicitly invalidated or if it timed out.

The Servlet 2.3 spec (section 10.7) states,

"It is often useful in tracking sessions to know whether a session
became invalid because the container timed out the session, or because a
web component within the application called the invalidate method. The
destinction may be determined indirectly using listeners and the
HTTPSession API methods."

If I can't call getMaxInactiveInterval() on an invalidated session, how
can I determine if the session was invalidated due to time out?  Is this
a bug in Tomcat?  It seems so since it doesn't follow the API docs for
this call.

Thanks in advance for any insight.

Chris Wilson

[EMAIL PROTECTED]
www.wondergeek.com



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to