spring-framework / org.springframework.context.annotation / EnableMBeanExport

EnableMBeanExport

@Target([AnnotationTarget.CLASS, AnnotationTarget.FILE]) @Import(MBeanExportConfiguration) class EnableMBeanExport

Enables default exporting of all standard MBeans from the Spring context, as well as well all @ManagedResource annotated beans.

The resulting org.springframework.jmx.export.MBeanExporter bean is defined under the name "mbeanExporter". Alternatively, consider defining a custom AnnotationMBeanExporter bean explicitly.

This annotation is modeled after and functionally equivalent to Spring XML's <context:mbean-export/> element.

Author
Phillip Webb

Since
3.2

See Also
MBeanExportConfiguration

Constructors

<init>

EnableMBeanExport(defaultDomain: String, server: String, registration: RegistrationPolicy)

Enables default exporting of all standard MBeans from the Spring context, as well as well all @ManagedResource annotated beans.

The resulting org.springframework.jmx.export.MBeanExporter bean is defined under the name "mbeanExporter". Alternatively, consider defining a custom AnnotationMBeanExporter bean explicitly.

This annotation is modeled after and functionally equivalent to Spring XML's <context:mbean-export/> element.

Properties

defaultDomain

val defaultDomain: String

The default domain to use when generating JMX ObjectNames.

registration

val registration: RegistrationPolicy

The policy to use when attempting to register an MBean under an javax.management.ObjectName that already exists. Defaults to RegistrationPolicy#FAIL_ON_EXISTING.

server

val server: String

The bean name of the MBeanServer to which MBeans should be exported. Default is to use the platform's default MBeanServer.