Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6663757

Define standard MBeanServerForwarders and convenient way to install them

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 6
    • Fix Version/s: 7
    • Component/s: core-svc
    • Labels:

      Description

      Work in the JSR 255 Expert Group has resulted in a proposal for three standard MBeanServerForwarders:

      * A "context forwarder" that simulates the existence of a namespace jmx.context// such that an incoming request such as getAttribute("jmx.context//locale=fr//d:k=v", "Foo") gets translated into getAttribute("d:k=v", "Foo") after installing "locale=fr" into the context of the thread handling the request. See CR 5072267.

      * A "description localizer" that intercepts the request getMBeanInfo and localizes the descriptions in the resultant MBeanInfo object into the locale communicated using the context forwarder, using the new method MBeanInfo.localizeDescriptions. See CR 6635499.

      * An "event client delegate" that simulates the existence of the EventClientDelegate MBean with its standard ObjectName. Requests such as EventClient.subscribe become operations on this MBean, invoke(eventClientDelegate, "subscribe", ...) in this case, and the MBean translates them into other operations such as addNotificationListener. See CR 5108776.

      A connector server can have a chain of MBeanServerForwarders that may include one or more of the above. The order of these forwarders is important. The context forwarder must appear before the description localizer so that the locale is already installed when the description is to be localized. The description localizer should appear before the event client delegate so that the MBeanInfo of the (simulated) EventClientDelegate MBean can be correctly localized. And finally the event client delegate must appear before any user-installed security-checking MBeanServerForwarder, so that the methods that are checked are ones that reflect what is happening, such as addNotificationListener, rather than a hard-to-decipher "invoke".

      The conclusion is that the existing chain of MBeanServerForwarders should be called the "user chain" and a new "system chain" should be introduced. Standard connector-server options will make it easy to configure the system chain with forwarders in the right order.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                emcmanus Eamonn McManus
                Reporter:
                emcmanus Eamonn McManus
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: