5

I have an MXBean that returns an attribute containing Set<UUID>.

When JConsole shows a UUID it treats it as composite data with two attributes - leastSignificantBits and mostSignifitcantBits.

Instead of changing my MXBean to return Set<String> is there some method (involving the server-side only) that would override the defaults and show the UUID in JConsole as if toString() had been called?

Mark
  • 28,783
  • 8
  • 63
  • 92

1 Answers1

0

Your resource class on the server side needs to implement

javax.management.DynamicMBean and override the method public MBeanInfo getMBeanInfo(). Here you need to return an appropriate object of MBeanInfo.

Specifically, you would need to convert the UUID to String in the getAttributes() method of returned MBeanInfo object.

RRM
  • 2,495
  • 29
  • 46