You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2010/09/29 11:01:32 UTC

[jira] Created: (ARIES-430) Whiteboard registration support for JMX DynamicMBeans

Whiteboard registration support for JMX DynamicMBeans
-----------------------------------------------------

                 Key: ARIES-430
                 URL: https://issues.apache.org/jira/browse/ARIES-430
             Project: Aries
          Issue Type: New Feature
          Components: JMX
            Reporter: Felix Meschberger


As proposed on dev [1] I have hacked together a small piece of code which implements support for the whiteboard pattern for registering MBeans with MBean servers.

The code is in my Sling whiteboard at https://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/jmx-whiteboard but is intended to be added to the Aries JMX functionality.

The single-class implementation picks up DynamicMBean servies registered as "javax.management.DynamicMBean". Each such service is registered with each registered MBeanServer service (similar to how the framework MBeans are registered by jmx.core). The JMX ObjectName can either be provided with a "jmx.objectname" service registration property (String type) or the DynamicMBean may implement the MBeanRegistration interface in which case the ObjectName is provided by the preRegister method during registration.

This is just a first hack which has not really been tested but mainly serves to show the idea. It is currently implemented as a Declarative Services component but may as well be implemented as a regular class using ServerTracker instances and instantiated by the BundleActivator (which may be a good idea to make this as widely usable as possible - for example in Sling we don't currently use Blueprint, so a Blueprint based implementation would be a no-go for us ;-) )

If there would be interest in this, I would try to test and validate this piece with the hopes to get a release soon (may be released independently, hint hint ;-) )


[1] http://markmail.org/message/p464v4gst2uifm5h

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ARIES-430) Whiteboard registration support for JMX DynamicMBeans

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Felix Meschberger updated ARIES-430:
------------------------------------

    Description: 
As proposed on dev [1] I have hacked together a small piece of code which implements support for the whiteboard pattern for registering MBeans with MBean servers.

The code is in my Sling whiteboard at http://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/jmx-whiteboard but is intended to be added to the Aries JMX functionality.

The single-class implementation picks up DynamicMBean servies registered as "javax.management.DynamicMBean". Each such service is registered with each registered MBeanServer service (similar to how the framework MBeans are registered by jmx.core). The JMX ObjectName can either be provided with a "jmx.objectname" service registration property (String type) or the DynamicMBean may implement the MBeanRegistration interface in which case the ObjectName is provided by the preRegister method during registration.

This is just a first hack which has not really been tested but mainly serves to show the idea. It is currently implemented as a Declarative Services component but may as well be implemented as a regular class using ServerTracker instances and instantiated by the BundleActivator (which may be a good idea to make this as widely usable as possible - for example in Sling we don't currently use Blueprint, so a Blueprint based implementation would be a no-go for us ;-) )

If there would be interest in this, I would try to test and validate this piece with the hopes to get a release soon (may be released independently, hint hint ;-) )


[1] http://markmail.org/message/p464v4gst2uifm5h

  was:
As proposed on dev [1] I have hacked together a small piece of code which implements support for the whiteboard pattern for registering MBeans with MBean servers.

The code is in my Sling whiteboard at https://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/jmx-whiteboard but is intended to be added to the Aries JMX functionality.

The single-class implementation picks up DynamicMBean servies registered as "javax.management.DynamicMBean". Each such service is registered with each registered MBeanServer service (similar to how the framework MBeans are registered by jmx.core). The JMX ObjectName can either be provided with a "jmx.objectname" service registration property (String type) or the DynamicMBean may implement the MBeanRegistration interface in which case the ObjectName is provided by the preRegister method during registration.

This is just a first hack which has not really been tested but mainly serves to show the idea. It is currently implemented as a Declarative Services component but may as well be implemented as a regular class using ServerTracker instances and instantiated by the BundleActivator (which may be a good idea to make this as widely usable as possible - for example in Sling we don't currently use Blueprint, so a Blueprint based implementation would be a no-go for us ;-) )

If there would be interest in this, I would try to test and validate this piece with the hopes to get a release soon (may be released independently, hint hint ;-) )


[1] http://markmail.org/message/p464v4gst2uifm5h


> Whiteboard registration support for JMX DynamicMBeans
> -----------------------------------------------------
>
>                 Key: ARIES-430
>                 URL: https://issues.apache.org/jira/browse/ARIES-430
>             Project: Aries
>          Issue Type: New Feature
>          Components: JMX
>            Reporter: Felix Meschberger
>
> As proposed on dev [1] I have hacked together a small piece of code which implements support for the whiteboard pattern for registering MBeans with MBean servers.
> The code is in my Sling whiteboard at http://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/jmx-whiteboard but is intended to be added to the Aries JMX functionality.
> The single-class implementation picks up DynamicMBean servies registered as "javax.management.DynamicMBean". Each such service is registered with each registered MBeanServer service (similar to how the framework MBeans are registered by jmx.core). The JMX ObjectName can either be provided with a "jmx.objectname" service registration property (String type) or the DynamicMBean may implement the MBeanRegistration interface in which case the ObjectName is provided by the preRegister method during registration.
> This is just a first hack which has not really been tested but mainly serves to show the idea. It is currently implemented as a Declarative Services component but may as well be implemented as a regular class using ServerTracker instances and instantiated by the BundleActivator (which may be a good idea to make this as widely usable as possible - for example in Sling we don't currently use Blueprint, so a Blueprint based implementation would be a no-go for us ;-) )
> If there would be interest in this, I would try to test and validate this piece with the hopes to get a release soon (may be released independently, hint hint ;-) )
> [1] http://markmail.org/message/p464v4gst2uifm5h

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ARIES-430) Whiteboard registration support for JMX DynamicMBeans

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916082#action_12916082 ] 

Guillaume Nodet commented on ARIES-430:
---------------------------------------

Yeah, I understand the blueprint vs ds problem, so maybe a plain Activator + ServiceTracker would be a good idea.  We actaully do the same in some aries components to make them as widely usable as possible too (for example the transaction manager just use the plain osgi api).



> Whiteboard registration support for JMX DynamicMBeans
> -----------------------------------------------------
>
>                 Key: ARIES-430
>                 URL: https://issues.apache.org/jira/browse/ARIES-430
>             Project: Aries
>          Issue Type: New Feature
>          Components: JMX
>            Reporter: Felix Meschberger
>
> As proposed on dev [1] I have hacked together a small piece of code which implements support for the whiteboard pattern for registering MBeans with MBean servers.
> The code is in my Sling whiteboard at http://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/jmx-whiteboard but is intended to be added to the Aries JMX functionality.
> The single-class implementation picks up DynamicMBean servies registered as "javax.management.DynamicMBean". Each such service is registered with each registered MBeanServer service (similar to how the framework MBeans are registered by jmx.core). The JMX ObjectName can either be provided with a "jmx.objectname" service registration property (String type) or the DynamicMBean may implement the MBeanRegistration interface in which case the ObjectName is provided by the preRegister method during registration.
> This is just a first hack which has not really been tested but mainly serves to show the idea. It is currently implemented as a Declarative Services component but may as well be implemented as a regular class using ServerTracker instances and instantiated by the BundleActivator (which may be a good idea to make this as widely usable as possible - for example in Sling we don't currently use Blueprint, so a Blueprint based implementation would be a no-go for us ;-) )
> If there would be interest in this, I would try to test and validate this piece with the hopes to get a release soon (may be released independently, hint hint ;-) )
> [1] http://markmail.org/message/p464v4gst2uifm5h

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (ARIES-430) Whiteboard registration support for JMX DynamicMBeans

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved ARIES-430.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.3

I've copied the sling code and integrated into the aries jmx component.

> Whiteboard registration support for JMX DynamicMBeans
> -----------------------------------------------------
>
>                 Key: ARIES-430
>                 URL: https://issues.apache.org/jira/browse/ARIES-430
>             Project: Aries
>          Issue Type: New Feature
>          Components: JMX
>            Reporter: Felix Meschberger
>            Assignee: Guillaume Nodet
>             Fix For: 0.3
>
>
> As proposed on dev [1] I have hacked together a small piece of code which implements support for the whiteboard pattern for registering MBeans with MBean servers.
> The code is in my Sling whiteboard at http://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/jmx-whiteboard but is intended to be added to the Aries JMX functionality.
> The single-class implementation picks up DynamicMBean servies registered as "javax.management.DynamicMBean". Each such service is registered with each registered MBeanServer service (similar to how the framework MBeans are registered by jmx.core). The JMX ObjectName can either be provided with a "jmx.objectname" service registration property (String type) or the DynamicMBean may implement the MBeanRegistration interface in which case the ObjectName is provided by the preRegister method during registration.
> This is just a first hack which has not really been tested but mainly serves to show the idea. It is currently implemented as a Declarative Services component but may as well be implemented as a regular class using ServerTracker instances and instantiated by the BundleActivator (which may be a good idea to make this as widely usable as possible - for example in Sling we don't currently use Blueprint, so a Blueprint based implementation would be a no-go for us ;-) )
> If there would be interest in this, I would try to test and validate this piece with the hopes to get a release soon (may be released independently, hint hint ;-) )
> [1] http://markmail.org/message/p464v4gst2uifm5h

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (ARIES-430) Whiteboard registration support for JMX DynamicMBeans

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ARIES-430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet reassigned ARIES-430:
-------------------------------------

    Assignee: Guillaume Nodet

> Whiteboard registration support for JMX DynamicMBeans
> -----------------------------------------------------
>
>                 Key: ARIES-430
>                 URL: https://issues.apache.org/jira/browse/ARIES-430
>             Project: Aries
>          Issue Type: New Feature
>          Components: JMX
>            Reporter: Felix Meschberger
>            Assignee: Guillaume Nodet
>
> As proposed on dev [1] I have hacked together a small piece of code which implements support for the whiteboard pattern for registering MBeans with MBean servers.
> The code is in my Sling whiteboard at http://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/jmx-whiteboard but is intended to be added to the Aries JMX functionality.
> The single-class implementation picks up DynamicMBean servies registered as "javax.management.DynamicMBean". Each such service is registered with each registered MBeanServer service (similar to how the framework MBeans are registered by jmx.core). The JMX ObjectName can either be provided with a "jmx.objectname" service registration property (String type) or the DynamicMBean may implement the MBeanRegistration interface in which case the ObjectName is provided by the preRegister method during registration.
> This is just a first hack which has not really been tested but mainly serves to show the idea. It is currently implemented as a Declarative Services component but may as well be implemented as a regular class using ServerTracker instances and instantiated by the BundleActivator (which may be a good idea to make this as widely usable as possible - for example in Sling we don't currently use Blueprint, so a Blueprint based implementation would be a no-go for us ;-) )
> If there would be interest in this, I would try to test and validate this piece with the hopes to get a release soon (may be released independently, hint hint ;-) )
> [1] http://markmail.org/message/p464v4gst2uifm5h

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ARIES-430) Whiteboard registration support for JMX DynamicMBeans

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918858#action_12918858 ] 

Felix Meschberger commented on ARIES-430:
-----------------------------------------

Updated the proposed bundle in Rev. 1005377, 1005378, 1005382, 1005383

  * Use Aries JMX parent POM
  * Add tests
  * Extend support for MBean services (see below)
  * Refactor into Aries JMX package space

With these commits I slightly modified the MBean service registration support as follows:

(1)  Any service registered with a service name ending with "MBean" is considered an MBean to register.

This encompasses any MBean implementing DynamicMBean, such as dynamic, open, model and standard MBeans. It also encompasses all simple MBeans registered with their MBean interfaces.

(2) An MBean service may provide a proposal for an Object to register as with the MBeanServers

The jmx.objectname service registration property can be provided by MBean services to be used as the object name for the registration with the object names. If this property is not set, MBean is expected to implement the MBeanRegistration interface. If the MBean service does not provide the jmx.objectname property and does not implement the MBeanRegistration interface it is not registered with any MBean server and thus ignored.

IMHO this source is no ready for move into the Aries project.

> Whiteboard registration support for JMX DynamicMBeans
> -----------------------------------------------------
>
>                 Key: ARIES-430
>                 URL: https://issues.apache.org/jira/browse/ARIES-430
>             Project: Aries
>          Issue Type: New Feature
>          Components: JMX
>            Reporter: Felix Meschberger
>
> As proposed on dev [1] I have hacked together a small piece of code which implements support for the whiteboard pattern for registering MBeans with MBean servers.
> The code is in my Sling whiteboard at http://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/jmx-whiteboard but is intended to be added to the Aries JMX functionality.
> The single-class implementation picks up DynamicMBean servies registered as "javax.management.DynamicMBean". Each such service is registered with each registered MBeanServer service (similar to how the framework MBeans are registered by jmx.core). The JMX ObjectName can either be provided with a "jmx.objectname" service registration property (String type) or the DynamicMBean may implement the MBeanRegistration interface in which case the ObjectName is provided by the preRegister method during registration.
> This is just a first hack which has not really been tested but mainly serves to show the idea. It is currently implemented as a Declarative Services component but may as well be implemented as a regular class using ServerTracker instances and instantiated by the BundleActivator (which may be a good idea to make this as widely usable as possible - for example in Sling we don't currently use Blueprint, so a Blueprint based implementation would be a no-go for us ;-) )
> If there would be interest in this, I would try to test and validate this piece with the hopes to get a release soon (may be released independently, hint hint ;-) )
> [1] http://markmail.org/message/p464v4gst2uifm5h

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ARIES-430) Whiteboard registration support for JMX DynamicMBeans

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ARIES-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927611#action_12927611 ] 

Felix Meschberger commented on ARIES-430:
-----------------------------------------

Thanks.

And so I removed the code from my whiteboard in Rev. 1030231.

> Whiteboard registration support for JMX DynamicMBeans
> -----------------------------------------------------
>
>                 Key: ARIES-430
>                 URL: https://issues.apache.org/jira/browse/ARIES-430
>             Project: Aries
>          Issue Type: New Feature
>          Components: JMX
>            Reporter: Felix Meschberger
>            Assignee: Guillaume Nodet
>             Fix For: 0.3
>
>
> As proposed on dev [1] I have hacked together a small piece of code which implements support for the whiteboard pattern for registering MBeans with MBean servers.
> The code is in my Sling whiteboard at http://svn.apache.org/repos/asf/sling/whiteboard/fmeschbe/jmx-whiteboard but is intended to be added to the Aries JMX functionality.
> The single-class implementation picks up DynamicMBean servies registered as "javax.management.DynamicMBean". Each such service is registered with each registered MBeanServer service (similar to how the framework MBeans are registered by jmx.core). The JMX ObjectName can either be provided with a "jmx.objectname" service registration property (String type) or the DynamicMBean may implement the MBeanRegistration interface in which case the ObjectName is provided by the preRegister method during registration.
> This is just a first hack which has not really been tested but mainly serves to show the idea. It is currently implemented as a Declarative Services component but may as well be implemented as a regular class using ServerTracker instances and instantiated by the BundleActivator (which may be a good idea to make this as widely usable as possible - for example in Sling we don't currently use Blueprint, so a Blueprint based implementation would be a no-go for us ;-) )
> If there would be interest in this, I would try to test and validate this piece with the hopes to get a release soon (may be released independently, hint hint ;-) )
> [1] http://markmail.org/message/p464v4gst2uifm5h

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.