Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-beta-3
    • Fix Version/s: 1.0-beta-4
    • Component/s: jmx
    • Labels:
      None
    • Number of attachments :
      0

      Description

      JMX registration is currently handled by a MBeanComponentAdapter.

      A better approach would be to deprecate this class and implement a JMXVisitor that can traverse a tree of containers and register them in the JMX registry.

      The JMXVisitor would need to be previously configured with information about what components to register in JMX. Several strategies are possible:

      1) Manual configuration.

      • Instantiate a JMXVisitor and call API methods on it. Something like:
        jmxVisitor.registerMbeanInfo(componentPath, mbeanInfo)

      This low level API would be used by the other approaces.

      2) Groovy markup
      When encountering jmx() nodes, call the appropriate registerMbeanInfo methods on a jmxVisitor. At the end of the parsing of the Groovy markup, the visitor is configured. The last step would be to have it traverse the tree.

      3) 1.5 Annotations
      JMX info could be encoded in annotations. A subclass of JMXVisitor (say AnnotationJMXVisitor) could look for annotations on components while traversing the pico tree.

      Using an approach like this would allow people to choose the approach they prefer: Groovy or Annotations. The Groovy jmx() nodes should be designed to be similar to the @jmx annotations.

      A similar approach could be used for nano-remoting.

        Activity

        Aslak Hellesøy made changes -
        Field Original Value New Value
        Comment [ 25453 ]
        Hide
        Aslak Hellesøy added a comment -

        A fourth option:

        4) ComponentAdapter
        JMXVisitor jv = new JMXVisitor();
        pico.registerComponent(new JMXCA(caDelegate, jv));

        the JMXCA would call jv.register.

        Show
        Aslak Hellesøy added a comment - A fourth option: 4) ComponentAdapter JMXVisitor jv = new JMXVisitor(); pico.registerComponent(new JMXCA(caDelegate, jv)); the JMXCA would call jv.register.
        Hide
        Michael Ward added a comment -

        I implemented, and checked in, scenarios 1 and 2. They are in jmx module. I've deprecated MBeanCA and MBeanCAFactory.

        StandardMBeanComponentAdapter is still valid but has been refactored.

        – Mike

        Also, for some reason I don't have access in JIRA to select myself to work on this issue

        Show
        Michael Ward added a comment - I implemented, and checked in, scenarios 1 and 2. They are in jmx module. I've deprecated MBeanCA and MBeanCAFactory. StandardMBeanComponentAdapter is still valid but has been refactored. – Mike Also, for some reason I don't have access in JIRA to select myself to work on this issue
        Jörg Schaible made changes -
        Assignee Michael Ward [ mward ]
        Hide
        Jörg Schaible added a comment -

        Set fixed version to 1.0-beta-4. Since Mike implemented 1+2, shall we close this issue for now? The annotation solution also applies to the server-side of EJB, we might add a separate issue for this feature.

        Show
        Jörg Schaible added a comment - Set fixed version to 1.0-beta-4. Since Mike implemented 1+2, shall we close this issue for now? The annotation solution also applies to the server-side of EJB, we might add a separate issue for this feature.
        Jörg Schaible made changes -
        Fix Version/s 1.0-beta-4 [ 11361 ]
        Fix Version/s 1.0-beta-3 [ 11242 ]
        Hide
        Aslak Hellesøy added a comment -

        let's say it's done - open new issues for annotations

        Show
        Aslak Hellesøy added a comment - let's say it's done - open new issues for annotations
        Aslak Hellesøy made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]

          People

          • Assignee:
            Michael Ward
            Reporter:
            Aslak Hellesøy
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: