[jbosscache-dev] JMX and MBeans in JBoss Cache 2.0.0

Manik Surtani manik at jboss.org
Thu Sep 7 10:02:28 EDT 2006


But you will have those aspects automatically anyway if you create a  
new instance of cache and call cache.start().  This will result in  
the cache binding CacheMBean to the JMX server - if a service name is  
specified - and if useInterceptorMBeans is set to true, each  
interceptor MBean will be bound as well.  This is all a part of  
Cache.create().

So by the time PC constructs and starts a Cache, this stuff will be  
avbl via JMX already so as far as user expectation goes, this is met.
--
Manik Surtani

Lead, JBoss Cache
JBoss, a division of Red Hat

Email: manik at jboss.org
Telephone: +44 7786 702 706
MSN: manik at surtani.org
Yahoo/AIM/Skype: maniksurtani


On 7 Sep 2006, at 14:52, Ben Wang wrote:

> The problem of creating a direct cache instance is then I need to  
> provide extra mbean defition for the Cache stats. User of PC still  
> expects to see the replication configuration and stats, e.g. By  
> obtaining the Cache from a Mbea/bean service, it will have those  
> aspects automatically.
>
> Of course, direct instance access (getCache()) is not what JMX  
> advocates but I guess that will have to do here.
>
> -Ben
>
> -----Original Message-----
> From: Manik Surtani [mailto:manik at jboss.org]
> Sent: Thursday, September 07, 2006 9:35 PM
> To: Ben Wang
> Cc: Bela Ban; jbosscache-dev at lists.jboss.org
> Subject: Re: [jbosscache-dev] JMX and MBeans in JBoss Cache 2.0.0
>
> Is that how you'd like PojoCache to work?  I would have thought in  
> the case of PojoCache, it creates an instance of Cache first and  
> then uses it, rather than using one registered in a JMX server.
>
> In any case, if you would prefer to get it off JMX, CacheMBean  
> could have a getCache() method that returns the Cache instance.
> --
> Manik Surtani
>
> Lead, JBoss Cache
> JBoss, a division of Red Hat
>
> Email: manik at jboss.org
> Telephone: +44 7786 702 706
> MSN: manik at surtani.org
> Yahoo/AIM/Skype: maniksurtani
>
>
> On 7 Sep 2006, at 14:25, Ben Wang wrote:
>
>> BTW, this JMX discussion also has impact on PojoCache as I am using
>> Cache as a delegate now. Besides the Cache management attributes, I'd
>> like to expose parts of PojoCache attributes as well. So I'd imagine
>> that PojoCache should look for the Cache bean service when configured
>> under AS, e.g. How does everyone see it?
>>
>> -Ben
>>
>> -----Original Message-----
>> From: jbosscache-dev-bounces at lists.jboss.org [mailto:jbosscache-dev-
>> bounces at lists.jboss.org] On Behalf Of Manik Surtani
>> Sent: Thursday, September 07, 2006 6:36 PM
>> To: Bela Ban
>> Cc: jbosscache-dev at lists.jboss.org
>> Subject: Re: [jbosscache-dev] JMX and MBeans in JBoss Cache 2.0.0
>>
>> Can't you register model MBeans programatically rather than via XML?
>>
>> Basically what I am thinking is an MBeanRegistrar class that inspects
>> your interceptor stack, and has a hardcoded list of  
>> reflect.Methods to
>> expose for each known interceptor type.  Sure, it means one clunky
>> class that does all of this but is this better than a dozen *MBean
>> interfaces?
>>
>> Cheers,
>> --
>> Manik Surtani
>>
>> Lead, JBoss Cache
>> JBoss, a division of Red Hat
>>
>> Email: manik at jboss.org
>> Telephone: +44 7786 702 706
>> MSN: manik at surtani.org
>> Yahoo/AIM/Skype: maniksurtani
>>
>>
>> On 6 Sep 2006, at 22:30, Bela Ban wrote:
>>
>>> I already use model MBeans to expose certain JGroups services, e.g.
>>> GossipRouter and Multiplexer. It geta bit unwieldy though, with all
>>> the verbose XML... How do you suppose to expose interceptors ? I
>>> think the big problem is that we need to dynamically expose
>>> (=register) them at stack startup time ?
>>>
>>> Manik Surtani wrote:
>>>> Hi guys.
>>>>
>>>> Rather than wrestle with MBean interfaces and also add clutter to
>>>> the various interfaces we have - and also to support future  
>>>> exposure
>>>> of interceptors, etc. to JMX, what do you think of using Model
>>>> MBeans instead of Standard MBeans?
>>>>
>>>>     http://java.sun.com/j2se/1.5.0/docs/api/javax/management/
>>>> modelmbean/package-summary.html
>>>>
>>>> Now I'm no JMX expert and I may be talking nonsense here so feel
>>>> free to tear this apart.  Brian, how would something like this work
>>>> for you since AS clustering gets cache references from JMX?
>>>> Do we still need to extend ServiceMBean in AS5?
>>>>
>>>> Cheers,
>>>> --
>>>> Manik Surtani
>>>>
>>>> Lead, JBoss Cache
>>>> JBoss, a division of Red Hat
>>>>
>>>> Email: manik at jboss.org
>>>> Telephone: +44 7786 702 706
>>>> MSN: manik at surtani.org
>>>> Yahoo/AIM/Skype: maniksurtani
>>>>
>>>>
>>>> _______________________________________________
>>>> jbosscache-dev mailing list
>>>> jbosscache-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/jbosscache-dev
>>>>
>>>
>>> --
>>> Bela Ban
>>> Lead JGroups / Manager JBoss Clustering Group JBoss - a division of
>>> Red Hat
>>>
>>
>> _______________________________________________
>> jbosscache-dev mailing list
>> jbosscache-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jbosscache-dev
>




More information about the jbosscache-dev mailing list