[SPR-5859] @ManagedOperation can now be used on getters/setters

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1899 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Rob Harrop
2009-09-16 09:25:48 +00:00
parent 457ae9f3a5
commit e46f8c044a
7 changed files with 23 additions and 11 deletions
@@ -42,6 +42,12 @@ public class AnnotationMetadataAssemblerTests extends AbstractMetadataAssemblerT
assertNotNull(op);
}
public void testOperationOnGetter() throws Exception {
ModelMBeanInfo inf = getMBeanInfoFromAssembler();
ModelMBeanOperationInfo op = inf.getOperation("getExpensiveToCalculate");
assertNotNull(op);
}
protected JmxAttributeSource getAttributeSource() {
return new AnnotationJmxAttributeSource();
}
@@ -65,6 +71,6 @@ public class AnnotationMetadataAssemblerTests extends AbstractMetadataAssemblerT
@Override
protected int getExpectedOperationCount() {
return super.getExpectedOperationCount() + 3;
return super.getExpectedOperationCount() + 4;
}
}
@@ -110,4 +110,6 @@ public class AnnotationTestBean implements IJmxTestBean {
return 3;
}
}
@@ -48,4 +48,8 @@ public class AnnotationTestSubBean extends AnnotationTestBean implements IAnnota
public void fromInterface() {
}
public int getExpensiveToCalculate() {
return Integer.MAX_VALUE;
}
}
@@ -29,4 +29,7 @@ public interface IAnnotationTestBean {
@ManagedOperation
void fromInterface();
@ManagedOperation
int getExpensiveToCalculate();
}