2 Replies Latest reply on Dec 15, 2002 6:53 AM by marc.fleury

    JCS

    dsavazzi

      Hi Bela,

      I think JCS (http://jakarta.apache.org/turbine/jcs/) could be adapted to be used inside of JBoss, is an implementation of a cache similar to JCache (JSR 107). For replication it can use http, xmlrpc, rmi, tcp and... JavaGroups!

        • 1. 3759817
          marc.fleury

          Ok., no confusion here about 1. and 2., but figured out the confusion.

          For no 1.:

          My basic design idea was to make a Model Mbean:

          public class CacheService implements ModelMbean, MBeanRegistration, XMBeanConstants {

          }

          This does not use any ICache/CacheImpl interfacing/Extending.

          Then in the MLet code pass an argument to the constructor which type of class the managed resource should be. In this case the Managed resource is a subclass of the Cache interface. Which operations to support can now dynamicaly be determined by reflecting the managed resource class type. And during the construction fase the ModelMBean can register a proxy in JNDI. But now we endup with a Model MBean, not a DynamicMBean. This ends up working exactly the other way around as you describe it ;-)!

          Alternatively if CacheImpl is going to be managed as a DynamicMBean, then either the CacheImpl, or one of its superclasses (possibly interface ICache, no clue if that is compliant) has to implement the DynamicMBean interface.

          Where I go amiss is:



          org.jboss.cache.CacheImpl has got to be a MBean somehow either by implementing a DynamicMBean interface, either by being a ModelMBean.

          For no 2.: This is where I managed to confuse you and myself. What I actually thought of doing was during task 1. register a dynamic proxy with JNDI, presetting it with a server reference so that when the proxy operates on the mbean, it doesn't have to lookup a server every time. But this is sort of sticky/dirty, and probably plainly wrong.

          For the record: these are my first steps into JMX. I hope to contribute to the advancement of JCache, instead of stalling it.

          • 2. Re: JCS
            belaban

            Yes, I know about JCS. I will definitely have a closer look at it. Looks like this is similar to what we want to do.

            I'll be putting the first MBean into org.jboss.cache next week (I have it ready but need to work on wrapping it into some MBean).

            Bela