4 Replies Latest reply on May 25, 2006 5:25 PM by rayhon1014

    Jboss Session Replication Problem

    umeshvc

      Hi ,
      I have a web app (no ejb's) as a part of ear for which iam trying to set up session replication. Iam trying to replicate sessions in two machines A and B.

      A and B are able to recognize each other as being a part the same partition (cluster-service.xml) and cluster (tc5-cluster....xml). Both servers start up without a problem.

      I logged into machine A , which will create session variable for login and password and then tried to hit a deep link in machine B.

      From what i understand because the session is replicated, machine b should not take me to the login page and i shd be directly routed to the deep link. But this is not happening instead iam routed back to the login page of machine b.

      I have went through the viewDemo test and a lot of other configurations that was suggested in the forums what am i doing wrong?

      THanks in advance
      Umesh

        • 1. Re: Jboss Session Replication Problem
          brian.stansberry

          Are you using container-based FORM authentication? If so, the username and password used to authenticate requests are not replicated with the session. There is a JIRA to add this feature: http://jira.jboss.com/jira/browse/JBAS-1900.

          If you use ClusteredSingleSignOn (http://wiki.jboss.org/wiki/Wiki.jsp?page=SingleSignOn) the login credentials will be available on the failover server.

          • 2. Re: Jboss Session Replication Problem
            rayhon1014

            We are using common html login form that takes username/password, query the database and set the username and role to the session via

            request.getSession().setAttribute("username", xxx);
            request.getSession().setAttribute("role", yyy);

            As i understand, if we have SET_AND_NON_PRIMITIVE_GET as replication trigger. Whenever, setAttriubute() is called to the session. The session will serialize to other nodes that belongs to the same partition right away. Am i right?

            If so, machine B seems like not getting the update since it redirects the deep link back to the login page.

            thanks

            • 3. Re: Jboss Session Replication Problem
              brian.stansberry

              OK, since you are doing your own authentication and are passing the username/password in the session, failover w/o a new login should work.

              When you say you "tried to hit a deep link in machine B" what do you mean? How do you know the link is for a different machine? If it has a different hostname, the browser isn't going to present your session cookie.

              • 4. Re: Jboss Session Replication Problem
                rayhon1014

                you are right. I forget this part. Now we have 2 boxes that are at the same partition. Is there an easy way we can find out that the session is really get replicated without putting the load balancer into the picture to test it out?

                thanks