Thursday, July 28, 2011

MBean operation name


@ManagedOperation(description="Ap Cache")
public String getApCache() { ...}

When invoked, got the error "Spring javax.management.MBeanException: Operation getApCache not in ModelMBeanInfo".

This is becasue the method name getXXX which can only be used for managedAttribute, not for operation. Changed it to showApCache() then worked.

No comments: