Announcement Announcement Module
Collapse
No announcement yet.
AutodetectCapableMBeanInfoAssembler & BeanDefinitionRegistry.registerBeanDefinition Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AutodetectCapableMBeanInfoAssembler & BeanDefinitionRegistry.registerBeanDefinition

    I have a task to expose mbeans that monitor a bunch execution statistics (number of threads executing, execution count, exception count, etc, etc).


    I want to expose a separate mbean for each interesting method that I want to monitor. The mbean interface is a @ManagedResource and several methods are annotated with @ManagedOperation.

    I'd like to register a bunch of these beans with the JMX exporter, using a BeanPostProcessor. The BeanPostProcessor identifies the beans of interest and creates the MBean entries indirectly by calling BeanDefinitionRegistry.registerBeanDefinition().

    If my MBean exporter is configured with an AutodetectCapableMBeanInfoAssembler, then will the beans gets exported
    when I call BeanDefinitionRegistry.registerBeanDefinition()?

    Does this approach make sense? I'm trying to automate the instrumentation. I don't want to export an MBean for every service method that gets added.

    --Michael
Working...
X