3 Replies Latest reply on May 25, 2002 6:00 AM by derry

    ServletContext in cluster env

    vish

      Hi,

      Can any one tell me if I use ServletContext to store data common to all servlets in a node, will it be replicated across all nodes??

      Thnaks

      Vish

        • 1. Re: ServletContext in cluster env
          slaboure

          Vish,

          You have to setup httpsession replication and store your data in the HttpSession object.

          Cheers,


          Sacha

          • 2. Re: ServletContext in cluster env
            vish

            > Vish,
            >
            > You have to setup httpsession replication and store
            > your data in the HttpSession object.
            >
            > Cheers,
            >
            >
            > Sacha


            Sacha,

            HttpSession's are related to a particular user. What if I store some value in ServletContext and keep changing the value for each call. I was interested to know if ServletContext gets replicated, then, no matter to which server my request goes I get a unique value, and ofcourse assuming the access the synchronized...

            Thanks

            Viswanath Ivatury

            • 3. Re: ServletContext in cluster env
              derry

              What I can say for Catalina:
              You cannot replicate the ServletContext because the ServletContext incorporates node-specific data (listeners etc.) that cannot be replicated.

              What is wrong with using a normal HTTPSession like Sacha mentioned it?

              CU
              Thomas