Hello,
I'm using MetadataMBeanInfoAssembler with commons-attributes annotation to export my MBeans. I've migrated from tomcat 4.1 to 5.0.30 and now I've got this exception stack :
Tomcat comes with jmx.jar (seems to be 1.1.1 jmx version, from mx4j project) that includes a check for "persistPeriod" to be > 0.Code:java.lang.IllegalArgumentException: Invalid value '0' for field persistPeriod at javax.management.modelmbean.DescriptorSupport.checkField(DescriptorSupport.java:258) at javax.management.modelmbean.DescriptorSupport.setField(DescriptorSupport.java:82) at org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler.populateMBeanDescriptor(MetadataMBeanInfoAssembler.java:257)
MetadataMBeanInfoAssembler sets this MBean attribute if mr.getPersistPeriod() >= 0
And default value for persistPeriod in org.springframework.jmx.export.metadata.ManagedRes ource is ... 0.
I had to update all my annotation to add "persistPeriod=-1".
It would be great to udate MetadataMBeanInfoAssembler to use
mr.getPersistPeriod() > 0.


Reply With Quote