7 Replies Latest reply on Dec 7, 2004 1:36 AM by analogueboy

    replication-granularity ATTRIBUTE problem

      hi,

      I'm applying HttpSessionReplication to my application.
      When replication-granularity is SESSION, replication works fine.

      But I set replication-granularity to ATTRIBUTE, and stressed the web-application.Then I got the following error log.

      2004-12-07 14:18:17,410 ERROR [TP-Processor10][org.jboss.cache.TreeCache] commit(): entry for transaction <smtla009:33398>:476 not found

      I changed the log level of TreeCache, and tried again.

      2004-12-07 14:18:17,407 DEBUG [TP-Processor1][org.jboss.cache.TreeCache] _put(<smtla009:33398>:475, "/JSESSION/km2Atal2mscTqdFK7beMAw**", km2Atal2mscTqdFK7beMAw**, org.jboss.invocation.MarshalledValue@7e98f89c)
      2004-12-07 14:18:17,408 DEBUG [TP-Processor10][org.jboss.cache.TreeCache] _put(<smtla009:33398>:476, "/JSESSION/f4Ul4Y9ouu93Ndxk6rOugw**/ATTRIBUTE", homepageVisits, org.jboss.invocation.MarshalledValue@79215bb4)
      2004-12-07 14:18:17,408 DEBUG [TP-Processor1][org.jboss.cache.TreeCache] _put(<smtla009:33398>:475, "/JSESSION/km2Atal2mscTqdFK7beMAw**/ATTRIBUTE", homepageVisits, org.jboss.invocation.MarshalledValue@79215bb3)
      2004-12-07 14:18:17,408 DEBUG [TP-Processor10][org.jboss.cache.TreeCache] callRemoteMethods(): destination list is empty, discarding call
      2004-12-07 14:18:17,408 DEBUG [TP-Processor1][org.jboss.cache.TreeCache] callRemoteMethods(): destination list is empty, discarding call
      2004-12-07 14:18:17,409 DEBUG [TP-Processor10][org.jboss.cache.TreeCache] callRemoteMethods(): destination list is empty, discarding call
      2004-12-07 14:18:17,409 DEBUG [TP-Processor1][org.jboss.cache.TreeCache] callRemoteMethods(): destination list is empty, discarding call
      2004-12-07 14:18:17,409 DEBUG [TP-Processor10][org.jboss.cache.TreeCache] commit(): called to commit cache with gtx <smtla009:33398>:476
      2004-12-07 14:18:17,409 DEBUG [TP-Processor1][org.jboss.cache.TreeCache] commit(): called to commit cache with gtx <smtla009:33398>:475
      2004-12-07 14:18:17,409 DEBUG [TP-Processor10][org.jboss.cache.TreeCache] commit(): releasing lock ...
      2004-12-07 14:18:17,409 DEBUG [TP-Processor1][org.jboss.cache.TreeCache] commit(): releasing lock ...
      2004-12-07 14:18:17,409 DEBUG [TP-Processor10][org.jboss.cache.TreeCache] commit(): releasing lock ...
      2004-12-07 14:18:17,409 DEBUG [TP-Processor1][org.jboss.cache.TreeCache] commit(): releasing lock ...
      2004-12-07 14:18:17,409 DEBUG [TP-Processor10][org.jboss.cache.TreeCache] commit(): releasing lock ...
      2004-12-07 14:18:17,409 DEBUG [TP-Processor1][org.jboss.cache.TreeCache] commit(): releasing lock ...
      2004-12-07 14:18:17,410 DEBUG [TP-Processor1][org.jboss.cache.TreeCache] commit(): removing local transaction key TransactionImpl:XidImpl[FormatId=257, GlobalId=smtla009.osaka.sunmoretec.co.jp/1794, BranchQual=, localId=1794]
      2004-12-07 14:18:17,410 DEBUG [TP-Processor10][org.jboss.cache.TreeCache] commit(): removing local transaction key TransactionImpl:XidImpl[FormatId=257, GlobalId=smtla009.osaka.sunmoretec.co.jp/1795, BranchQual=, localId=1795]
      2004-12-07 14:18:17,410 DEBUG [TP-Processor10][org.jboss.cache.TreeCache] commit(): called to commit cache with gtx <smtla009:33398>:476
      2004-12-07 14:18:17,410 ERROR [TP-Processor10][org.jboss.cache.TreeCache] commit(): entry for transaction <smtla009:33398>:476 not found

      #To avoid CuncurrentModificationException, I had to change one logging code("commit(): releasing lock ...")

      I see two "commit(): called to commit cache with gtx <smtla009:33398>:476".
      Why commit happened twice?
      ATTRIBUTE granularity is not reliable?


      environment:
      RedHat AS2.1
      JDK1.4.2_03
      Apache2+mod_jk2
      JBoss4.0.0
      replication-trigger is SET
      (when SET_AND_NON_PRIMITIVE_GET was set, the result was the same)

        • 1. 3857655
          belaban

          Does anyone know of a simple and I mean simple, for beginners guide. A guide on how to of showing a(once again) simple JSP using JbossIDE and Eclipse. I have searched the web and found many guides, but they either are incomplete, assuming that you know what goes in between the massive gaps they leave in the so called beginners tutorial. Or they are inandated with so much techno bable, and complicated examples that attempt to show you a how to using complicated math problems.

          All i need is a very, very simple in plain english simple Hello World JSP example using the JBossIDE and Eclipse.

          I can run a Hello World JSP example using the Tomcat buy itself or only using JBoss no IDE, but when its coupled with the Eclipse there are more steps to get it to work. I can see the potential of being able to use this on bigger more complicated projects, but we simple folk must first be able to understand how it works with a very, very simple example and then we can build from there.

          It seems that these people that come up with this stuff are very smart but are inept at being able to explain it to someone else not versed in there techy talk. That or they simple have forgotten what it was like being a beginner(so much distance they have traveled from were they were in the beginning).

          Any help
          much appreciated. :)

          • 2. Re: replication-granularity ATTRIBUTE problem
            analogueboy

            I've opened a bug in jira.

            http://jira.jboss.com/jira/browse/JBWEB-7

            This is my first time to use jira.So I'm afraid that I did something wrong.And I couldn't find a way to assign you.(Should I choose porject 'JBossCache' ?)

            Anyway, I will send you a server.log ASAP.

            • 3. Re: replication-granularity ATTRIBUTE problem

              Thanks for letting me know. Is there a good way to reproduce this problem? If not, can you send me the log file to ben.wang@jboss.com?

              I did some load test when 3.2.6 was released. But none of this problem was discovered, of course.

              -Ben

              • 4. Re: replication-granularity ATTRIBUTE problem

                Thank you for reply.

                This can easily reproduce with a simple servlet handling HttpSession.
                like this:

                public void doGet(HttpServletRequest request, HttpServletResponse response)
                 throws ServletException, IOException {
                
                 HttpSession session = request.getSession();
                 Integer value = (Integer)session.getAttribute("COUNT");
                 if (value == null) {
                 value = new Integer(0);
                 }
                 session.setAttribute("COUNT", new Integer(value.intValue() + 1));
                
                 /* building html */
                }


                and stress the servlet using JMeter(100threads or more...).
                mod_jk2 is not necessary requirement for this problem.

                I found this problem only with 4.0.0.
                With 3.2.6, this didn't occur.

                This is not log4j issue. The duplicate commit message is found only for the TX which ends up with the error log.

                • 5. Re: replication-granularity ATTRIBUTE problem

                  OK, that may explain it. I only did load test on 3.2.6 (although not as heavy, perhaps). Anyway, this is a serious bug. Can you do me a favor of opening a bug in jira.jboss.com (we are migrating to JIRA for issue tracking now)? I'd say the category is either web or just AS.

                  Please assign it to me and I will take a look.

                  thanks again,

                  -Ben

                  • 6. Re: replication-granularity ATTRIBUTE problem

                    Oh, one more thing. Would you mind sending me your log. There maybe a chance that I can decipher it.

                    -Ben

                    • 7. Re: replication-granularity ATTRIBUTE problem

                      I've opened a bug in jira.

                      http://jira.jboss.com/jira/browse/JBWEB-7

                      This is my first time to use jira.So I'm afraid that I did something wrong.And I couldn't find a way to assign you.(Should I choose porject 'JBossCache' ?)

                      Anyway, I will send you a server.log ASAP.