Avalon Phoenix
  1. Avalon Phoenix
  2. PNIX-50

Access to MBeanServer by Applications

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Management applications need to be able to access the JMX tree for Phoenix kernel. If we made it accessible in the application then the management application could be just another Phoenix application and could use all regular Spice services.

        Activity

        Hide
        peter royal added a comment -

        There may be a use for both methods then. Allowing the MBeanServer to be available to blocks, as well as a SystemManager.

        I would prefer a SystemManager over the methods in the BlockContext in PNIX-31 because then a block could create child SystemManagers as needed for its own internal component heirarchy (if any).

        Show
        peter royal added a comment - There may be a use for both methods then. Allowing the MBeanServer to be available to blocks, as well as a SystemManager. I would prefer a SystemManager over the methods in the BlockContext in PNIX-31 because then a block could create child SystemManagers as needed for its own internal component heirarchy (if any).
        Hide
        Peter Donald added a comment -

        Well the main reason I wanted to expose the MBeanServer was not to make it possible to register more MBeans but to make it possible to "manage" an application and thus the SystemManager facade is not sufficient.

        I was thinking that we would simplify exporting of child elements by something like outlined in PNIX-31

        Show
        Peter Donald added a comment - Well the main reason I wanted to expose the MBeanServer was not to make it possible to register more MBeans but to make it possible to "manage" an application and thus the SystemManager facade is not sufficient. I was thinking that we would simplify exporting of child elements by something like outlined in PNIX-31
        Hide
        peter royal added a comment -

        The thing is, I actually like the facade, as is provides a much simpler interface to expose things for management. It is also more IoC-friendly as a component can call SystemManager.getSubContext() and pass that as a manager to contained components.

        Passing the MBeanServer in the context gives you more control via JMX, but also requires the block authors to do more work in registering services for JMX (ObjectName creation for starters...)

        Show
        peter royal added a comment - The thing is, I actually like the facade, as is provides a much simpler interface to expose things for management. It is also more IoC-friendly as a component can call SystemManager.getSubContext() and pass that as a manager to contained components. Passing the MBeanServer in the context gives you more control via JMX, but also requires the block authors to do more work in registering services for JMX (ObjectName creation for starters...)
        Hide
        Peter Donald added a comment -

        I would actually prefer to keep it in - at least for now. The reason is that people can still use a NoopSystemManager and not require JMX on their classpath. I know that there is a few people who do this so maybe we keep it decoupled for the moment. Later on we could relook at it and possibly remove the facade.

        Show
        Peter Donald added a comment - I would actually prefer to keep it in - at least for now. The reason is that people can still use a NoopSystemManager and not require JMX on their classpath. I know that there is a few people who do this so maybe we keep it decoupled for the moment. Later on we could relook at it and possibly remove the facade.
        Hide
        peter royal added a comment -

        Should the SystemManager abstraction on top of JMX be removed then if we are going to expose JMX directly?

        Show
        peter royal added a comment - Should the SystemManager abstraction on top of JMX be removed then if we are going to expose JMX directly?
        Hide
        Peter Donald added a comment -

        I would prefer that the simple JMX MBeanServer be available in the context. So what a user would do is something like

        MBeanServer mBeanServer =
        (MBeanServer)context.get( MBeanServer.class.getName() );

        Then we could choose to put the JMX interfaces in root classloader and we would not need to pollute the application classloader with kernel classes that are probably more brittle.

        However to do this cleanly I guess we need to have the JMX implementation aand interfaces separated out completely and that requires some changes in MX4J as specified in PNIX-26 .

        Show
        Peter Donald added a comment - I would prefer that the simple JMX MBeanServer be available in the context. So what a user would do is something like MBeanServer mBeanServer = (MBeanServer)context.get( MBeanServer.class.getName() ); Then we could choose to put the JMX interfaces in root classloader and we would not need to pollute the application classloader with kernel classes that are probably more brittle. However to do this cleanly I guess we need to have the JMX implementation aand interfaces separated out completely and that requires some changes in MX4J as specified in PNIX-26 .
        Hide
        peter royal added a comment -

        JMX tree as exposed via the SystemManager interface though, right?

        My gut is to make it a "global" service that is available to all applications via the ServiceManager. Of course that is based off of the commented out block in BlockContext.

        Thus any block could do ServiceManager.lookup( SystemManager.ROLE );

        Show
        peter royal added a comment - JMX tree as exposed via the SystemManager interface though, right? My gut is to make it a "global" service that is available to all applications via the ServiceManager. Of course that is based off of the commented out block in BlockContext. Thus any block could do ServiceManager.lookup( SystemManager.ROLE );
        Peter Donald created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Peter Donald
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development