I have attached the LoggingMBean interface and the javadoc should be
self-explanatory.  We have a custom mlet (see beolow), that we load and
figure out the class and ObjectName and then we use the MBeanServer
api's to instantiate and register the MBean.  We use the container's
MBeanServer for deployed apps in that instance, in this case it is
Tomcat.  For example,

<MLET archive="dummy.jar" code="com.foo.Logging"
name="tvworks:app=test,name=Logging,type=Logging"/>

javax.management.loading.MLet.getMBeansFromURL(String url);

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eugene
Kuleshov
Sent: Tuesday, October 23, 2007 2:25 PM
To: [email protected]
Cc: [EMAIL PROTECTED]
Subject: Re: [tc-dev] [tc-users] How to cluster MBeans


  Most likely yes. Would you mind to create a small app that will show 
how you create and use Logging
and LoggingMBean? It will be easier to figure out what could be done
then.

  regards,
  Eugene


Jason Chaffee wrote:
> This is basically what I want to do, share an MBean based on
application
> context.  However, I do not spring.  Can this be done without spring?
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Eugene
> Kuleshov
> Sent: Tuesday, October 23, 2007 12:33 PM
> To: [EMAIL PROTECTED]
> Cc: [email protected]
> Subject: Re: [tc-users] How to cluster MBeans
>
> Jason Chaffee wrote:
>   
>> I would like to cluster MBeans based on ObjectName, is there an easy
>>     
> way
>   
>> to do this?
>>
>> For example, I have the following classes LoggingMBean.java and
>> Logging.java and I have several apps that use these classes but each
>>     
> app
>   
>> uses a unique ObjectName.  I would like apps to share attributes of
>>     
> the
>   
>> LoggingMBean, but only if they have the same ObjectName.
>>   
>>     
>   Jason, can you give some more details on how you create your Logging

> and LoggingMBean instances and how you publish them in JMX?
>
>   If you are using Spring, you may want to look at the Counter example

> in Terracotta kit.
>   
>
http://www.terracotta.org/confluence/display/docs1/Spring+Quick+Start#Sp
> ringQuickStart-JMX
>   
>
http://www.terracotta.org/confluence/display/docs1/Terracotta+for+Spring
> +Clustering+Tutorial
>
>   regards,
>   Eugene
>
>
> _______________________________________________
> tc-users mailing list
> [EMAIL PROTECTED]
> http://lists.terracotta.org/mailman/listinfo/tc-users
> _______________________________________________
> tc-dev mailing list
> [email protected]
> http://lists.terracotta.org/mailman/listinfo/tc-dev
>   

_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Attachment: LoggingMBean.java
Description: LoggingMBean.java

_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to