5 Replies Latest reply on Jul 20, 2002 10:43 AM by Joao Clemente

    Clustering two nodes on JBoss3.0

    sumeer khosa Newbie

      Hi,

      I am new to the world of clustering and am still trying to get hang of how to do it in JBoss. I am an application that consists of servlets/JSP'c. No EJB at all. And i am running it on two sun boxes seperately. These boxes also are running Apache1.3 respectively alongwith JBoss3.0-Tomcat4.1 version. How do i set my clustering policy in jboss.xml? Do i really have to define a bean definition for clustering?

      Also, i am confused about how will the request from say box1 in my case get redirected to box2(with same SESSION) if box1 fails? Any help will be appreciated.

      Thanks
      Sumeer.

        • 1. Re: Clustering two nodes on JBoss3.0
          Thomas Peuss Newbie

          Clustering for catalina (tomcat) is NOT in jboss 3.0.0. You can test jboss 3.0.1RC1 (it is on sourceforge.net).
          All you have to do is deploying jbossha-httpsession.sar in your deploy-directory and the clustering is enabled automatically.

          The failover mechanism can be done with an Apache in front. See http://www.theserverside.com/resources/article.jsp?l=Tomcat for details of configuring a failover mechanism with Apache.

          You can use a hardware loadbalancer, too. We do that at work with a f5 BigIP.

          CU
          Thomas

          • 2. Re: Clustering two nodes on JBoss3.0
            Joao Clemente Newbie

            What exactly will be done in JBoss next versions that isn't done with the 3.0.0 , regarding clustering at web/servet/jsp level?
            For instance, will httpSession handling become part of JBoss instead of the usual Jetty or Tomcat?
            What else?

            • 3. Re: Clustering two nodes on JBoss3.0
              Thomas Peuss Newbie

              Both Jetty and Tomcat use the generic httpsession-clustering service of JBoss.

              CU
              Thomas

              • 4. Re: Clustering two nodes on JBoss3.0
                Sacha Labourey Master

                "For instance, will httpSession handling become part of JBoss instead of the usual Jetty or Tomcat?"

                What do you mean?

                • 5. Re: Clustering two nodes on JBoss3.0
                  Joao Clemente Newbie

                  > "For instance, will httpSession handling become part
                  > of JBoss instead of the usual Jetty or Tomcat?"
                  >
                  > What do you mean?


                  Well, maybe I shoudn't do this, but I tend to see JBoss3.0 as a JBoss (ejb container) + servlet container (either Tomcat or Jetty).
                  I keep thinking that JBoss handles EJB (SFSB) replication & failover, but that the HttpSession (that belong at the servlet layer) is handled by Jetty or Tomcat. Therefore httpSession replication would be handled "outside" JBoss..

                  So, there would be some "software layer" where Jetty/Tomcat would do (or not) replication of httpSession, and that had nothing to do with "JBoss (EJB) layer".

                  From Derri's reply I assumed that JBoss provided the communication/grouping framework for communication between the cluster nodes.

                  Maybe I should think of JBoss3.0 as a full web/servlet/ejb server instead?

                  Getting it all togheter, I used to think that clustering at servlet layer would be something that Tomcat guys or Jetty guys would have to implement themselves and that JBoss would not handle. Now it seems that JBoss also handles the servlet layer.

                  For what I now see, all my reasoning was wrong from the start.. maybe I was seeing things from the wrong side?