1 Reply Latest reply on Aug 5, 2003 8:26 AM by jonlee

    how to set session never invalidate

    malongfa

      In my web application ,the error which session is invalidate always happen . The jboss my uses is jboss3.00_tomcat4.03.I want to know how to config jboss to set session invalidate error never happen
      again.

        • 1. Re: how to set session never invalidate
          jonlee

          If you are talking about the servlet session timeout, then this will not be overly influenced by JBoss. In Tomcat, the default is defined in the web.xml for Tomcat. I'm not sure where this is in the 3.0.x release as I don't have a captive copy.

          In it, should be a definition like this.
          <session-config>
          <session-timeout>30</session-timeout>
          </session-config>

          According to the Servlet 2.3 spec, a negative number for MaxInactiveInterval means that the session never times out. So presumably you can set this value in the web.xml to -1.

          However, the side effect is that you effectively implement a memory leak in your system. Sessions have housekeeping data as well as session data and since sessions never expire, your system will keep consuming memory with each new session and this will not be reclaimed.