Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 5072476
Votes 1
Synopsis RFE: support cascaded (federated) MBean Servers
Category jmx:classes
Reported Against mustang
Release Fixed 7(b36)
State 10-Fix Delivered, request for enhancement
Priority: 4-Low
Related Bugs 6254721 , 6323896 , 6446447 , 6669137 , 6714954 , 6735243 , 5072268 , 5108739
Submit Date 09-JUL-2004
Description
Several implementations based on the JMX API include some support for "cascading" or "federation".  The idea is that one or more "subagents" can have some or all of their MBeans proxied into a "master agent", where "agent" means MBean Server.  The proxies may not have the same name as the proxied MBeans.

The proposal is to allow a "mount" operation, analogous to Unix filesystem mounting.  If subagent S has an MBean X called "com.example:type=Whatsit", and S is mounted with name "sub" in master agent M, then M will have a proxy MBean X' called "sub/com.example:type=Whatsit".  Accessing an attribute or operation on X' will cause the proxy to forward the access to X and return the result to the caller.  Where a parameter or return value in X is or contains an ObjectName such as "com.example:type=Thing", the proxy will do the appropriate mapping so that the ObjectName is seen by callers of X' as "sub/com.example:type=Thing".

The complete details of cascading will be considerably more complicated than described here. 
Work Around
N/A
Evaluation
Cascading is a special case of a more general notion, that of constructing a hierarchy of MBeanServers.  The idea is that within an MBeanServer mbs1, you can specify that another MBeanServer mbs2 appears as "mbs2//", for example.  So if you do mbs1.getAttribute("mbs2//d:k=v", "Foo"), that ends up calling mbs2.getAttribute("d:k=v").  mbs2 can be any object that implements the MBeanServer interface.  It can be a reference to a remote MBeanServer via a connector, which is the basis for building cascading.  It can be an object that constructs the referenced MBeans on demand, which is the basis for Virtual MBeans (see CR 5108739).

"mbs2//" is called a "namespace", and is created by registering an MBean of the class JMXNamespace (or a subclass), with the special ObjectName "mbs2//:type=JMXNamespace".  The JMXNamespace MBean is given an instance of MBeanServer that is the MBeanServer that appears as "mbs2//...", mbs2 in the example.

The characters "//" in the domain part of an ObjectName indicate a path in the hierarchy.  Previously, mbs1.getAttribute("mbs2//d:k=v", "Foo") just looked for an MBean of that name in mbs1.  Now, it looks for a namespace called "mbs2//" and does getAttribute("d:k=v", "Foo") within it.

The meaning of * in an ObjectName is adjusted so that it does not match the separator "//".  Therefore if you call mbs1.queryNames(new ObjectName("*:*"), null), you will not see the MBeans within mbs2, whose names begin with "mbs2//".  On the other hand, if you call mbs1.queryNames(new ObjectName("mbs2//*:*"), null), you *will* see those MBeans, for example "mbs2//d:k=v".

For further details, consult the documentation of package javax.management.namespaces in the documentation reachable from the JSR 255 pages at <http://jcp.org/en/jsr/detail?id=255>.
Posted Date : 2008-01-24 13:28:54.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang