1 2 Previous Next 17 Replies Latest reply on Dec 23, 2011 4:21 AM by rhusar Go to original post
      • 15. Re: JBoss 7, domain and clustering
        vikaskumar24

        Hi Rado,

        I went through the links you mentioned earlier, and the second link mentions one point aout Infinispan, which is:

        "Infinispan has the ability to store cache data on flat File or Jdbc, thus achieving data consistency in the event of system failure.".

         

        My questions could be naive and very basic, as I'm very new to Jboss world and infinispan.

         

        I have few questions here:

        1. I am assuming the cachestore will write all the Cache data to external system say DB, and not just Cache Overflow data. Pl correct me if my assumption is right or not.

        2. Say there are 4 nodes in the cluster, again I hope the Cache being written to external system is the overall distributed cache not just individual Node's cache, is this assumtion correct? (As I understand, infinispan is distributed cache so each node has same cache in "repl" mode and in case of "dist" mode several nodes have the redudant cache, so may be point about "individual Node's cache could be invalid", but it will help to understand from experts better).

         

         

        Thanks,

        Vikas

        • 16. Re: JBoss 7, domain and clustering
          vikaskumar24

          Hi,

          I was doing some experiments with web container cache and below is my config, and I have configured two nodes in my test cluster. I'm trying to test both "repl" and "dist" mode, but here I'm using "repl" mode.

           

          I'm using standalone-ha profile, below way:

          standalone.bat --server-config=standalone-ha.xml

           

           

          <cache-container name="web" default-cache="repl">

                          <alias>

                              standard-session-cache

                          </alias>

                          <replicated-cache mode="ASYNC" name="repl" batching="true">

                              <locking isolation="REPEATABLE_READ"/>

                              <file-store preload="true" passivation="false" fetch-state="true" purge="false"/>

                          </replicated-cache>

                          <distributed-cache mode="ASYNC" name="dist" batching="true">

                              <locking isolation="REPEATABLE_READ"/>

                              <file-store preload="true" passivation="false" fetch-state="true" purge="false"/>

                          </distributed-cache>

                      </cache-container>

           

          Now I run a simple JSP which basically like below:

           

          HttpSession httpSession = request.getSession();

              out.println("Session ID: " + httpSession.getId()+ "<br />");

              for(int i=0;i<10;i++){

                  if(httpSession.getAttribute("Vikas"+i) == null){

                      out.println("Not Found "+ "<br />");

                      System.out.println("Not Found i "+ i);

                      httpSession.setAttribute("Vikas"+i,new String("Kumar"+i));

                  }

              }

           

          So when I run this JSP, a cache file gets generated on both the nodes, I kill Node1 and I very well get the Session data from Node2, everything works well. Now I kill Node2 as well, and just bring back Node1 up, but the cache file that was generdated on Node1 (in this case), I see getting empited (0 bytes), and then disappears. And then I refresh the page, I see the above "Not found" on JSP and a new cache file is created even though I'm using purge="false", and here is the url for the XSD for Jboss-AS-Infinispan "http://fossies.org/unix/www/jboss-as-web-7.0.2.Final.tar.gz:a/jboss-as-web-7.0.2.Final/docs/schema/jboss-as-infinispan_1_0.xsd".

           

          My question here is, Am I heading and configuring the Infinispan correct way?

           

          Thanks,

          Vikas

          • 17. Re: JBoss 7, domain and clustering
            rhusar

            Vikas,

             

            you should try out stuff with latest 7.1.0.CR1, just out yesterday.

            http://www.jboss.org/jbossas/downloads

             

            I think the 7.0.2 you are using has this bug which is what you were seeing probably.

            https://issues.jboss.org/browse/AS7-2463

             

            For Infinispan specific questions, go to (or course look at the docs first).

            http://www.jboss.org/infinispan/forums

             

            HTH,

            Rado

            1 2 Previous Next