6 Replies Latest reply on Feb 10, 2014 8:36 AM by wdfink

    Session replication in JBoss 7.1.1

    redshift

      Hello,

       

      I run two JBoss 7.1.1 instances in domain mode on two different hosts and I want to ralize a cluster between servers belonging to a group, my question is: to obtain session replication is it necessary to use mod_cluster? If so, why?

       

      Thanks.

        • 1. Re: Session replication in JBoss 7.1.1
          wdfink

          If you run a clustered application the server only replicate your session with the sessionId.

          The apache in front will create the http session with the id and pass it to the JBoss-server. If this server fail apche/mod_cluster will do the failover and use another server, here the session will be available.

           

          Without that server in front you will not have such features. See AS7 Cluster Howto

          1 of 1 people found this helpful
          • 2. Re: Session replication in JBoss 7.1.1
            redshift

            Thank you for your answer,

             

            of course to let the cluster work I need a load balancer. I read the Howto you posted but it was not so clear for me about the function of mod_cluster. What I'm saying is that I could use anything with load balancer function, is that correct?

            Anyway I'll soon test an application in this environment to resolve my doubts.

             

            Regards.

            • 3. Re: Session replication in JBoss 7.1.1
              midnightmare

              Hi,

               

              I have followed that HowTo, but session replication doesn't work. Maybe problem is httpd configuration?

              • 4. Re: Session replication in JBoss 7.1.1
                pferraro

                What evidence do you have that session replication is not working?  Provided you start your application server using an ha profile, and your web application is <distributable/>, session replication should just work.  Can you verify that your servers can communicate with one another?  What does your server log say?

                • 5. Re: Session replication in JBoss 7.1.1
                  midnightmare

                  Hi,

                   

                  The profile used is full-ha, serves communicate, and in web.xml I have added <distributable />, but if stop the server in the master via web-console, and retry to connect to him, the request is not served by slave.

                   

                  The jboss-web.xml is necessary?

                  • 6. Re: Session replication in JBoss 7.1.1
                    wdfink

                    For me that sounds like you use the host:port of the master http-port all the time.

                    That is not possible, you need to use the host:port of the apache (or loadbalancer) in front of the JBoss instances. This instance will route the request to one off the JBoss and in case of failure use the survived one.