I may not understand your use case exactly, but maybe what you want is to add a small bit of indirection between your users of these MBeans and the MBeanServer. So instead of directly looking up the beans, you make a call to your class that can decide whether to return a clustered bean instance, or to just lookup the bean as normal from the MBeanServer. The clustered instances can just be stored in a HashMap and I think the toString() form of ObjectName will make for suitable keys to the map.
In general I think creating this construct yourself will be easier than trying to cluster the internals of existing MBeanServer implementations. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:tc-dev- > [EMAIL PROTECTED] On Behalf Of Jason Chaffee > Sent: Tuesday, October 23, 2007 11:53 AM > To: [email protected] > Cc: [EMAIL PROTECTED] > Subject: [tc-dev] How to cluster MBeans > > 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. > > Thanks. > _______________________________________________ > 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
