3 Replies Latest reply on Aug 20, 2003 4:56 AM by bigdave

    HttpSession values not updating

    bigdave Newbie

      I'm having problems with my two jboss-3.2.1_tomcat-4.1.24 instances updating changes to a clustered session correctly. My test JSP does a setAttribute with a String, and the other instance picks up the change correctly when I display the value in another JSP. The problem is that after that any attempts to set the attribute to any other value does not get passed across to the other instance.
      The logs show _set methods being called and it all looks fine, but no changes happen beyond the initial value:

      10:58:31,747 DEBUG [ClusteredHTTPSessionService] setHttpSession called for sessi
      on: +pbcRKk8f+piN8hMoCozaQ**
      10:58:36,403 DEBUG [DefaultPartition] Partition DefaultPartition received msg
      10:58:36,403 DEBUG [DefaultPartition] pre methodName: DistributedState._set
      10:58:36,403 DEBUG [DefaultPartition] handlerName: DistributedState methodName:
      10:58:36,403 DEBUG [DefaultPartition] Handle: DistributedState._set

      Any help would be greatly appreciated.

        • 1. Re: HttpSession values not updating
          bigdave Newbie

          In answer to my own question- while trying to get apache2/tomcat sticky sessions working as a workaround to my clustering woes- I set the jvmroute property in


          to reflect the server/AJP port used eg:

          Which fixed both problems- sessions were sticky as they had something to bind to, as mentioned elsewhere on this forum, but more importantly my clustered instances now had the jvmroute appended to their JSessionID to uniquely identify the object.

          Previously I would imagine that each instance was searching for the exact same JSessionID key and only ever using their local copy of the session, but now that machine/port names are appended they recognise remote instances they might like to try to use.

          I haven't found any mention of this in the JBoss clustering document, so be advised.

          • 2. Re: HttpSession values not updating
            Sacha Labourey Master

            which version : mod_jk or mod_jk2?

            • 3. Re: HttpSession values not updating
              bigdave Newbie

              This is under mod_jk2. I've got sticky sessions going fine now there's a jvmroute in there, although I was somewhat surprised that this also fixed my HttpSession clustering problems...