8 Replies Latest reply on Aug 18, 2010 6:47 PM by kaddy

    Clustering Seam 2.1.2 and Jboss AS 5.1

    Mason Harding Newbie

      Hi all.  I am trying to get multi server clustering set up with Jboss AS 5.1 and Seam 2.1.2.  In my web.xml I have
      <distributable/>
      and in components.xml I have



      <core:init distributable="true"/>
      <security:identity authenticate-method="#{authBean.login}" remember-me="true"/>





      in AuthBean I have



          @In(create = true)
          private Identity identity;
          @In(required = false)
          @Out(scope = ScopeType.SESSION, required = false)
          public Account userSessionAccount;
      
          public Boolean login() {
                  Account account = (Account) em.createQuery(
                      "SELECT a FROM Account a WHERE LOWER(a.userName) = :userName AND a.password = :password").
                      setParameter("userName", identity.getUsername().toLowerCase()).
                      setParameter("password", identity.getPassword()).getSingleResult();
      
                  setUserSessionAccount((Account) account.clone());
              return true;
          }





      I'm starting Jboss AS with



      sh run.sh -c all -b 10.1.1.1 -Djboss.messaging.ServerPeerID=1 -u 239.255.100.100




      and 10.1.1.2 on the other server.  Both servers see eachother



      [org.jboss.cache.RPCManagerImpl] (Incoming-16,10.1.1.1:50118) Received new cluster view: [10.1.1.1:50118|1] [10.1.1.1:50118, 10.1.1.2:36343]




      but when I visit my application from a web browser on one of the servers, nothing seems to happen in the JbossAS log file on the other server. 


      As per the seam reference, to confirm that the HTTP session is replicating I should bring up the jmx-console and look for Category: jboss.cache : Entry: service:TomcatClusteringCache, but no such service is listed. 


      What I'm really looking for is to have the login, and Account userSessionAccount replicated on both servers.


      I am fairly clueless when it comes to JbossAS and Seam clustering, so any help would be greatly appreciated.


      Thanks all!
      Mason