diff --git a/spring-framework-reference/src/jmx.xml b/spring-framework-reference/src/jmx.xml
index 1620fa16171..d5d2a5e6370 100644
--- a/spring-framework-reference/src/jmx.xml
+++ b/spring-framework-reference/src/jmx.xml
@@ -421,178 +421,31 @@ public class JmxTestBean implements IJmxTestBean {
-
-
- Using JDK 5.0 Annotations
-
- To enable the use of JDK 5.0 annotations for management interface
- definition, Spring provides a set of annotations that mirror the Commons
- Attribute attribute classes and an implementation of the
- JmxAttributeSource strategy interface,
- the AnnotationsJmxAttributeSource class, that
- allows the MBeanInfoAssembler to read
- them.
-
- The example below shows a bean where the management interface is defined
- by the presence of JDK 5.0 annotation types:
-
+ The example below shows the annotated version of the
+ JmxTestBean class that you saw earlier:
- As you can see little has changed, other than the basic syntax of
- the metadata definitions.
+ Here you can see that the JmxTestBean class
+ is marked with the ManagedResource annotation and
+ that this ManagedResource annotation is configured
+ with a set of properties. These properties can be used to configure
+ various aspects of the MBean that is generated by the
+ MBeanExporter, and are explained in greater
+ detail later in section entitled .
+ You will also notice that both the age and
+ name properties are annotated with the
+ ManagedAttribute annotation, but in the case of
+ the age property, only the getter is marked. This
+ will cause both of these properties to be included in the management
+ interface as attributes, but the age attribute will
+ be read-only.
+
+ Finally, you will notice that the add(int, int)
+ method is marked with the ManagedOperation
+ attribute whereas the dontExposeMe() method is not.
+ This will cause the management interface to contain only one operation,
+ add(int, int), when using the
+ MetadataMBeanInfoAssembler.
+
+ The configuration below shouws how you configure the
+ MBeanExporter to use the
+ MetadataMBeanInfoAssembler:
@@ -672,6 +549,15 @@ public class AnnotationTestBean implements IJmxTestBean {
]]>
+
+
+ Here you can see that an
+ MetadataMBeanInfoAssembler bean has been
+ configured with an instance of the
+ AnnotationJmxAttributeSource class and passed to
+ the MBeanExporter through the assembler property.
+ This is all that is required to take advantage of metadata-driven
+ management interfaces for your Spring-exposed MBeans.