@ManagedResource
@Component
public class MyBean {
Map<String, Something> map = new HashMap<String, Something>();
@ManagedAttribute
public Collection<Something> getFoo() {
return map.values();
}
}
The foo attributed shows as 'unavailable' in the visualvm mbeans tab. Why?
I annotated the bean with @MXBean then returned CompositeData[] creating instances of CompositeDataSupport.