I have a simple third party object - a DTO with about 10+ public fields only (it get filled as an atomic operation). I would like to be able to monitor it in JConsole without writing a lot of boilerplate code.
I tried to:
Any other suggestions?
It would be helpful if you posted you failing MXBean code. Typically, you would just need to define a DTOMXBean interface, make the DTO implement it and then register the DTO. (It sounds like a weird lifecycle for a DTO since they're usually fairly transient, but that's a topic for a different question).
Keep in mind that the MXBean attributes should not return values of types not defined in javax.management.openmbean.OpenType.ALLOWED_CLASSNAMES_LIST , otherwise you will get a NonCompliant exception. If you must expose types that cannot be represented as one of those types, you will need to define new composite types to expose them as.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.