4 Replies Latest reply on Aug 23, 2007 11:18 AM by billwangbill

    Cannot see nodes and attached map in JMX console

    billwangbill

      I am a newbie for Jboss Treecache. I am going to put treecache into my
      jboss server. the following are my config values for Eviction:
      1000
      0
      0

      I call the method putCacheData to save data in treecache in the first request( through Struts, Ejb3)
      putCacheData() {
      .....
      tree.put("/classes/cs-101", "description", "the basics");
      tree.put("/classes/cs-101", "teacher", "Ben");
      ....
      }

      I only can see node classes in JMX console and no /classes/cs-101 in tree.
      and then I call getCacheData() method in another request
      getCacheData() {
      .....
      String descValue = (String) tree.get("/classes/cs-101", "description"
      String csValue = (String) tree.get("/classes/cs-101", "teacher");
      ....
      }

      both descValue and csValue are null in the debug mode

      Could somebody help me? I need see what value put into tree in the different request even though different session with application scope variable. Thanks in advance.

      Bill

        • 1. Re: Cannot see nodes and attached map in JMX console
          manik

          Have you tried using Fqn.fromString() instead of using Strings?

          • 2. Re: Cannot see nodes and attached map in JMX console
            billwangbill

            Thanks. I get the following error message by using
            Fqn.fromString()
            javax.management.IntrospectionException: Failed to find PropertyEditor for type: org.jboss.cache.Fqn
            org.jboss.jmx.adaptor.control.Server.invokeOpByName(Server.java:251)
            org.jboss.jmx.adaptor.control.Server.invokeOp(Server.java:223)
            org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.invokeOp(HtmlAdaptorServlet.java:262)
            org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdaptorServlet.java:100)
            org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doPost(HtmlAdaptorServlet.java:82)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
            javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

            However, I am going to use TreeCache to resolve issue like case as follows:
            No User A User B
            1 Request read v(= 5)
            2 Request read v( =5 )
            3 Change v (8) (screen)
            4 change v (6) (screen)
            5 save v Transaction Tb
            6 save v Transaction Ta

            I want to protect variable v without querying database. So User A save action should be rejected. To do this, Ta need know v is changed by Tb. Ta start after Tb finish.

            Thank you again,

            Bill

            • 3. Re: Cannot see nodes and attached map in JMX console
              manik

              I just realised that you are doing this via JMX. JMX won't support objects like Fqn.

              Does this work if you work on the cache directly, rather than via JMX?

              • 4. Re: Cannot see nodes and attached map in JMX console
                billwangbill

                I have tried using Fqn put value in my DAO layer when user B retrieve data from DB. They are available to read in EJB 3 layer. They disppear when user B in saving processing except for their parent nodes. Nodes that are attached data are only exist in the same request. Do all the nodes with data have to bundle to a GlobalTrasaction? Could you tell me a way to let other GlobalTransactions cannot see them? Thank you very much.