5 Replies Latest reply on Feb 11, 2005 11:53 PM by kausar_m_s

    Http session Replication

    kausar_m_s

      hi

      I have created a statefull session bean.successfuly deployed on my machine. we are using the clustering of Jboss. I want to achive the http session replication.

      What are the changes required in the configuratin file to achive Http session replication. b'coz failover is working fine but it is not mainting the state of the Bean. as we are storing Bean in session object. when we do session.getAttribute("abc") then it gives null pointer exception. b'coz session object is lost by JNDI.


      B'coz we searched google lot. all forums.


        • 1. Re: Http session Replication
          hariv

          If you are using JBOSS-3.2.3 and above; under <Server Instance>/deploy/jbossweb-tomcat50.sar/META-INF directory ; there is a jboss-service.xml file. Check whether the following elements are commented out; this enable HTTPSession replication.

          instant

          <!-- you must switch to "interval" to use this attribute (msec) -->
          2000

          Thanks

          Hari

          • 2. Re: Http session Replication
            kausar_m_s

            Hi Hari

            I have done that changes in jboss-service.xml but still we are not able to retrive the values.
            suppose if req goge to node 1 then for all other node 2,3,4 it gives null pointer exception but again for node 1 it maintains the session.

            • 3. Re: Http session Replication
              kausar_m_s

              Hi Hari
              I have done that configuration changes already.
              3 nodes are clustered. If for the first time request goes to server A (we are using RoundRobin) there its creates the session and gives us response. but for node B and C it gives us error Null pointer Exceptions. When req comes to A its shows the result.

              We want the bean shoud be replicated accross all the node and shoud maintain the state of bean.

              • 4. Re: Http session Replication
                hariv

                When you start the jboss instance in all the boxes; do they recongnize each other? What is the version of jboss you are using? Are you using any WebServer's like Apache(mod_jk) and forwarding the requests to JBOSS or are you hitting jboss directly?

                • 5. Re: Http session Replication
                  kausar_m_s

                  Hi
                  Thanks for ur help

                  In Jboss it recognize every other node.
                  We are using apache with mod_jk as a load balancer.
                  we have also written Worker.properties and mod_jk.conf file .