dev@glassfish.java.net

Re: Ask the Expert Questions on project GlassFish forward

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Wed, 16 Nov 2005 16:13:59 -0800

Amy Roh wrote On 11/14/05 12:22,:
> Hi GlassFish developers,
>
> I'd like to discuss the following questions that we received during Ask
> the Expert event on GlassFish for more visibility.
>
> Can you answer to the list if you have inputs?
>
> Thanks,
> Amy

> 4) SUN AS doesn't invoke sessionDestroyed if session times out. This is
> violation of Servlet 2.4
> spec. http://forum.java.sun.com/thread.jspa?threadID=656087
> Is it fixed in glassfish ? If not, can you please assign some
> developers to do it ?

I've replied to Maris on the forum, as follows:

=====================================================================
Can you describe your setup?

I just verified that HttpSessionListener.sessionDestroyed() is getting
invoked when a session expires. I can confirm this for both AS 8.1 and
Glassfish.

There are 2 parameters that have impact on the timing of a session
expiration and its removal:

- the session's maxInactiveInterval, which may be set by using
  HttpSession.setMaxInactiveInterval() (default: 30 minutes)

- the reap interval for expired sessions, which determines how long the
  thread responsible for purging expired sessions (and notifying session
  listeners) sleeps before doing his job (default: 1 minute). This
  interval may be configured by using the "reapIntervalSeconds" seesion
  manager property in sun-web.xml, as follows:

  <sun-web-app>
    <session-config>
      <session-manager>
        <manager-properties>
          <property name="reapIntervalSeconds" value="<your_value>" />
        </manager-properties>
      </session-manager>
    </session-config>
  </sun-web-app>



Jan