com.sun.management.OperatingSystemMXBean use in an OSGi bundle
- by Paul Whelan
I have some legacy code that was used to monitor my applications cpu,memory etc that I want to convert to a bundle. Now when i start this bundle its complaining
Missing Constraint: Import-Package: com.sun.management; version="0.0.0"
I had used the OperatingSystemMXBean to get access to stats on the JVM.
My question is can I use this class inside an OSGI container and if so how? Or should I use some other way to monitor my application. I was making an RMI call to the application from a web frontend to get the nodes performance figures pre OSGi.