use of com.sun.appserv.management.j2ee.JVM in project Payara by payara.
the class J2EETest method testJVMs.
public void testJVMs() {
final QueryMgr queryMgr = getQueryMgr();
final Set jvms = queryMgr.queryJ2EETypeSet(J2EETypes.JVM);
final Iterator iter = jvms.iterator();
String lastVendor = null;
String lastVersion = null;
while (iter.hasNext()) {
final JVM jvm = (JVM) iter.next();
// the ObjectName of the Node must match the String version for "node"
assert (jvm.getnode() != null);
// the JVMs should all have the same vendor (presumably)
assert (jvm.getjavaVendor() != null);
if (lastVendor == null) {
lastVendor = jvm.getjavaVendor();
} else {
assert (lastVendor.equals(jvm.getjavaVendor()));
}
// the JVMs should all have the same version (presumably)
assert (jvm.getjavaVersion() != null);
if (lastVersion == null) {
lastVersion = jvm.getjavaVersion();
} else {
assert (lastVersion.equals(jvm.getjavaVersion()));
}
}
}