9 Replies Latest reply on May 2, 2007 10:06 PM by shilps

    Silly session timeout question

      I am trying to control the session timeout value of a webapp deployed under JBOSS 3.2. I cannot get control. I change the <session-timeout> value in web.xml and my session does not time out.

      When I look at the web-console entry for this web app Under "Current sessions statistics - Max inactive time" it says "60", but down below, where it shows the deployment descriptor it says:
      <session-config>
      <session-timeout>1</session-timeout>
      </session-config>

      The latter is correct. This is at present simply deployed on a local jboss server with a local apache webserver. What other configuration could be causing the web.xml session-timeout value to be ignored?

        • 1. Re: Silly session timeout question

          Can nobody answer this question?

          If the session timeout value in web.xml is not being respected, what could be overriding it?

          • 2. Re: Silly session timeout question
            starksm64

            1 min = 60 seconds.

            • 3. Re: Silly session timeout question

              Thanks, Scott.
              However, I'm not sure it answers the question.

              Here is the comment from http://java.sun.com/dtd/web-app_2_3.dtd

              "The session-timeout element defines the default session timeout
              interval for all sessions created in this web application. The
              specified timeout must be expressed in a whole number of minutes.
              If the timeout is 0 or less, the container ensures the default
              behaviour of sessions is never to time out."

              Does the web-console display convert this number to seconds, or does it follow the same convention as what the DTD mandates?

              By entering "1" I meant to specify a one-minute session timeout. My main question then is, still, if this isn't working, that is, if the session does not time out in one minute, what other process could be causing this to be overridden?

              • 4. Re: Silly session timeout question

                After doing a little further research, I can now confirm that the value that the JBoss web console displays is measured in seconds, which is different from how it is specified in web.xml (in minutes). Changing the web.xml value to "60" caused the web console display to change to "3600". So the discrepancy between web.xml and the web console is resolved and is a red herring.

                I still need to know:
                if the value in web.xml is not being respected, and sessions do not time out at the requested interval, where do I look next?

                • 5. Re: Silly session timeout question
                  ssilvert

                  There is a bug in (I think 3.2.5 and/or 3.2.6) that causes session timeout to stay at 30 minutes if you are also using cluster. I'm pretty sure this is fixed in 3.2.7.

                  Stan Silvert

                  • 6. Re: Silly session timeout question

                    Hmm, that's interesting. Our team's development workstations use 3.2.5 JBoss although the production site is at 3.2.1. (Stupid, I know, but it hasn't caused many problems). So, I'll ask, did this problem exist before 3.2.5?

                    • 7. Re: Silly session timeout question

                       

                      "stan.silvert@jboss.com" wrote:
                      There is a bug in (I think 3.2.5 and/or 3.2.6) that causes session timeout to stay at 30 minutes if you are also using cluster. I'm pretty sure this is fixed in 3.2.7.

                      Stan Silvert


                      Stan, is there a "bugzilla" or the equivalent for JBoss that you could point me at, where I could research this issue?

                      • 8. Re: Silly session timeout question
                        starksm64
                        • 9. Re: Silly session timeout question
                          shilps

                          unable to make out where to set session timeout property..there are so many web.xml files in jboss-3.2.2..I am confused!!
                          Please tell the path at which web.xml should be modified for session time out