4 Replies Latest reply on Aug 11, 2004 9:43 AM by tcherel

    A few questions on JBoss Cache features.

    tcherel

      After a first read of the tutorial, FAQ and TreeCache documentation, I have a few questions on JBossCache:

      1) Locking: when J2EE transactions are used, I suppose that locking is done accross all the nodes of the cluster. Is it correct?

      2) I saw in the different post that XAResource interface was not implemented yet, only the Synchronization interface was. Is is it still the case? If yes, the section 7 of the TreeCache documentation is talking about 2PC and how it works with TreeCache, but I do not understand how TreeCache can rollback the transaction if only the Synchronization interface is implemented.

      3) Any thought (or not) on security support in JBoss Cache? I guess the first concern is to make sure that you can control who can access object in the cache. Is this something that JBoss cache will address at some point or is it completely up to the way the app server is configured and the security at the MBean level if JBossCache is deployed as an MBean?

      Thanks in advance for the help.

      Thomas

        • 1. Re: A few questions on JBoss Cache features.
          tcherel


          I guess my questions do not make too much sense since nobody us replying :-)
          I will try to do further research.
          I'd like to add two more questions (hopefully these ones make nore sense):

          1) Can I create multiple cache instances (multiple MBean instance for a TreeCache) and that they all share the same JGroups channels? If yes, is there any recommendations as when it is better to share or not? I have the impression that the protocol stak of JGroups is doing enough things that for a few caches without too many objects in it, sharing the channels is better from a network traffic point of view.

          2) What are the classpath requirements for the TreeCache MBean? Does it need to have in its classpath the classes of the object that will be cached? It seems not to be the case with JBoss but JBoss class loading is "special enough" that I do not know if it will be the case if I do the same thing on WebSphere or WebLogic for example.
          Basically, I'd like to see if I can create a J2EE application to wrap the JBossCache Mbean in order to create and manage caches instances dynamically (create and register new Mbeans dynamically) and have some other J2EE applications (deployed in a separate ear) accessing this cache management app and adding new objects in a new cache (through a session facade). On WebSphere and WebLogic, the two app are definitely not sharing classes and I am wondering if that will work.
          For example, the documentation is saying that TreeCacheAOP does not need to have serializable classes because class instances are re-created via reflection. If this is the case, I suppose that I need the cached object class in the classpath somewhere, don't I?

          Thanks.

          Thomas

          • 2. Re: A few questions on JBoss Cache features.

            Thomas,

            Here are the answers to some of your questions. Sorry for the late reply. Bela and I are swamped recently.

            1. Locking. Yes and no. During a tx context, locking is obtained in the current node. But it is not propogated untill tx is committed. If it fails, it will rollback.

            2. XAResource is not implemented yet.

            3. There is currently no security mechanism

            4. Yes, you can create multiple cache clusters sharing the smae channel (but different cluster names). Main problem is if the cache cluster traffic is heavy, the channel will become nosiy.

            5. JBossCache deployed under application server (e.g. JBoss AS) requires special attention for classloader scope if you application has special scope (e.g., different child repository under JBoss). I have posted this couple weeks back. I will put this into FAQ.

            -Ben

            • 3. Re: A few questions on JBoss Cache features.
              tcherel

              Ben,

              Thanks for the answers. I appreciate.
              I think I found the post you mentioned about the class loader (http://www.jboss.org/index.html?module=bb&op=viewtopic&t=52082).
              I will do a few tests as I need JBossCache to work in WebSphere and WebLogic (which, I think have scoped class loader by default).

              Thomas

              • 4. Re: A few questions on JBoss Cache features.
                tcherel

                Sorry, wrong post reference.
                The correct on, I believe, is http://www.jboss.org/index.html?module=bb&op=viewtopic&t=52056

                Thomas