以下字段在用于JMX的Spring @ManagedResource
中意味着什么? Spring documentation中没有Javadoc或相关说明。
1. String persistPolicy() default ""; 2. int persistPeriod() default -1; 3. String persistLocation() default ""; 4. int currencyTimeLimit() default -1;
答案 0 :(得分:20)
这些传递到JMX api - 您可以在JMX java doc中找到有关它的更多信息。在此处复制相关部分 -
persistPolicy : OnUpdate|OnTimer|NoMoreOftenThan|OnUnregister|Always|Never
persistLocation : The fully qualified directory name where the MBean should be persisted (if appropriate)
persistFile : File name into which the MBean should be persisted
persistPeriod : seconds - frequency of persist cycle for OnTime and NoMoreOftenThan PersistPolicy
currencyTimeLimit : how long value is valid, <0 never, =0 always, >0 seconds
答案 1 :(得分:0)
我怀疑这些注释字段无效 - 例如:Did Java 5 forget JMX MBean persistence?