Package javax.management.j2ee.statistics

Examples of javax.management.j2ee.statistics.JVMStats


        J2EEDomain[] domains = helper.getDomains();
        J2EEServer[] servers = domains[0].getServerInstances();
        JVM[] jvms = helper.getJavaVMs(servers[0]);
        long elapsed = System.currentTimeMillis() - jvms[0].getKernelBootTime().getTime();
        if(jvms[0].isStatisticsProvider()) {
            JVMStats stats = (JVMStats) ((StatisticsProvider)jvms[0]).getStats();
            BoundedRangeStatistic heap = stats.getHeapSize();
            return new DynamicServerInfo(heap.getCurrent(), heap.getHighWaterMark(), heap.getUpperBound(), elapsed);
        } else {
            return new DynamicServerInfo(elapsed);
        }
    }
View Full Code Here


        assertEquals(new Integer(runtime.availableProcessors()), kernel.getAttribute(JVM_NAME, "availableProcessors"));
    }

    public void testStatistics() throws Exception {
        assertEquals(Boolean.TRUE, kernel.getAttribute(JVM_NAME, "statisticsProvider"));
        JVMStats stats = (JVMStats) kernel.getAttribute(JVM_NAME, "stats");
        assertNotNull(stats.getHeapSize());
        assertTrue(stats.getHeapSize().getCurrent() > 0);
        assertNotNull(stats.getHeapSize().getDescription());
        assertTrue(stats.getHeapSize().getHighWaterMark() > 0);
        assertTrue(stats.getHeapSize().getLastSampleTime() > 0);
        assertTrue(stats.getHeapSize().getLowerBound() == 0);
        assertTrue(stats.getHeapSize().getLowWaterMark() > 0);
        assertNotNull(stats.getHeapSize().getName());
        assertTrue(stats.getHeapSize().getStartTime() > 0);
        assertNotNull(stats.getHeapSize().getUnit());
        assertTrue(stats.getHeapSize().getUpperBound() > 0);
        assertNotNull(stats.getUpTime());
        assertTrue(stats.getUpTime().getCount() > 0);
        assertNotNull(stats.getUpTime().getDescription());
        assertTrue(stats.getUpTime().getLastSampleTime() > 0);
        assertNotNull(stats.getUpTime().getName());
        assertTrue(stats.getUpTime().getStartTime() > 0);
        assertNotNull(stats.getUpTime().getUnit());
    }
View Full Code Here

        J2EEDomain[] domains = helper.getDomains();
        J2EEServer[] servers = domains[0].getServerInstances();
        JVM[] jvms = helper.getJavaVMs(servers[0]);
        long elapsed = System.currentTimeMillis() - jvms[0].getKernelBootTime().getTime();
        if(jvms[0].isStatisticsProvider()) {
            JVMStats stats = (JVMStats) ((StatisticsProvider)jvms[0]).getStats();
            BoundedRangeStatistic heap = stats.getHeapSize();
            return new DynamicServerInfo(heap.getCurrent(), heap.getHighWaterMark(), heap.getUpperBound(), elapsed);
        } else {
            return new DynamicServerInfo(elapsed);
        }
    }
View Full Code Here

        assertEquals(new Integer(runtime.availableProcessors()), kernel.getAttribute(JVM_DATA.getAbstractName(), "availableProcessors"));
    }

    public void testStatistics() throws Exception {
        assertEquals(Boolean.TRUE, kernel.getAttribute(JVM_DATA.getAbstractName(), "statisticsProvider"));
        JVMStats stats = (JVMStats) kernel.getAttribute(JVM_DATA.getAbstractName(), "stats");
        assertNotNull(stats.getHeapSize());
        assertTrue(stats.getHeapSize().getCurrent() > 0);
        assertNotNull(stats.getHeapSize().getDescription());
        assertTrue(stats.getHeapSize().getHighWaterMark() > 0);
        assertTrue(stats.getHeapSize().getLastSampleTime() > 0);
        assertTrue(stats.getHeapSize().getLowerBound() == 0);
        assertTrue(stats.getHeapSize().getLowWaterMark() > 0);
        assertNotNull(stats.getHeapSize().getName());
        assertTrue(stats.getHeapSize().getStartTime() > 0);
        assertNotNull(stats.getHeapSize().getUnit());
        assertTrue(stats.getHeapSize().getUpperBound() > 0);
        assertNotNull(stats.getUpTime());
        assertTrue(stats.getUpTime().getCount() > 0);
        assertNotNull(stats.getUpTime().getDescription());
        assertTrue(stats.getUpTime().getLastSampleTime() > 0);
        assertNotNull(stats.getUpTime().getName());
        assertTrue(stats.getUpTime().getStartTime() > 0);
        assertNotNull(stats.getUpTime().getUnit());
    }
View Full Code Here

        J2EEDomain[] domains = helper.getDomains();
        J2EEServer[] servers = domains[0].getServerInstances();
        JVM[] jvms = helper.getJavaVMs(servers[0]);
        long elapsed = System.currentTimeMillis() - jvms[0].getKernelBootTime().getTime();
        if(jvms[0].isStatisticsProvider()) {
            JVMStats stats = (JVMStats) ((StatisticsProvider)jvms[0]).getStats();
            BoundedRangeStatistic heap = stats.getHeapSize();
            return new DynamicServerInfo(heap.getCurrent(), heap.getHighWaterMark(), heap.getUpperBound(), elapsed);
        } else {
            return new DynamicServerInfo(elapsed);
        }
    }
View Full Code Here

        J2EEDomain[] domains = helper.getDomains();
        J2EEServer[] servers = domains[0].getServerInstances();
        JVM[] jvms = helper.getJavaVMs(servers[0]);
        long elapsed = System.currentTimeMillis() - jvms[0].getKernelBootTime().getTime();
        if(jvms[0].isStatisticsProvider()) {
            JVMStats stats = (JVMStats) ((StatisticsProvider)jvms[0]).getStats();
            BoundedRangeStatistic heap = stats.getHeapSize();
            return new DynamicServerInfo(heap.getCurrent(), heap.getHighWaterMark(), heap.getUpperBound(), elapsed);
        } else {
            return new DynamicServerInfo(elapsed);
        }
    }
View Full Code Here

        J2EEDomain[] domains = helper.getDomains();
        J2EEServer[] servers = helper.getServers(domains[0]);
        JVM[] jvms = helper.getJavaVMs(servers[0]);
        long elapsed = System.currentTimeMillis() - jvms[0].getKernelBootTime().getTime();
        if(jvms[0].isStatisticsProvider()) {
            JVMStats stats = (JVMStats) ((StatisticsProvider)jvms[0]).getStats();
            BoundedRangeStatistic heap = stats.getHeapSize();
            return new DynamicServerInfo(heap.getCurrent(), heap.getHighWaterMark(), heap.getUpperBound(), elapsed);
        } else {
            return new DynamicServerInfo(elapsed);
        }
    }
View Full Code Here

        J2EEDomain[] domains = helper.getDomains();
        J2EEServer[] servers = domains[0].getServerInstances();
        JVM[] jvms = helper.getJavaVMs(servers[0]);
        long elapsed = System.currentTimeMillis() - jvms[0].getKernelBootTime().getTime();
        if(jvms[0].isStatisticsProvider()) {
            JVMStats stats = (JVMStats) ((StatisticsProvider)jvms[0]).getStats();
            BoundedRangeStatistic heap = stats.getHeapSize();
            return new DynamicServerInfo(heap.getCurrent(), heap.getHighWaterMark(), heap.getUpperBound(), elapsed);
        } else {
            return new DynamicServerInfo(elapsed);
        }
    }
View Full Code Here

        J2EEDomain[] domains = helper.getDomains();
        J2EEServer[] servers = domains[0].getServerInstances();
        JVM[] jvms = helper.getJavaVMs(servers[0]);
        long elapsed = System.currentTimeMillis() - jvms[0].getKernelBootTime().getTime();
        if(jvms[0].isStatisticsProvider()) {
            JVMStats stats = (JVMStats) ((StatisticsProvider)jvms[0]).getStats();
            BoundedRangeStatistic heap = stats.getHeapSize();
            return new DynamicServerInfo(heap.getCurrent(), heap.getHighWaterMark(), heap.getUpperBound(), elapsed);
        } else {
            return new DynamicServerInfo(elapsed);
        }
    }
View Full Code Here

        assertEquals(new Integer(runtime.availableProcessors()), kernel.getAttribute(JVM_DATA.getAbstractName(), "availableProcessors"));
    }

    public void testStatistics() throws Exception {
        assertEquals(Boolean.TRUE, kernel.getAttribute(JVM_DATA.getAbstractName(), "statisticsProvider"));
        JVMStats stats = (JVMStats) kernel.getAttribute(JVM_DATA.getAbstractName(), "stats");
        assertNotNull(stats.getHeapSize());
        assertTrue(stats.getHeapSize().getCurrent() > 0);
        assertNotNull(stats.getHeapSize().getDescription());
        assertTrue(stats.getHeapSize().getHighWaterMark() > 0);
        assertTrue(stats.getHeapSize().getLastSampleTime() > 0);
        assertTrue(stats.getHeapSize().getLowerBound() == 0);
        assertTrue(stats.getHeapSize().getLowWaterMark() > 0);
        assertNotNull(stats.getHeapSize().getName());
        assertTrue(stats.getHeapSize().getStartTime() > 0);
        assertNotNull(stats.getHeapSize().getUnit());
        assertTrue(stats.getHeapSize().getUpperBound() > 0);
        assertNotNull(stats.getUpTime());
        assertTrue(stats.getUpTime().getCount() > 0);
        assertNotNull(stats.getUpTime().getDescription());
        assertTrue(stats.getUpTime().getLastSampleTime() > 0);
        assertNotNull(stats.getUpTime().getName());
        assertTrue(stats.getUpTime().getStartTime() > 0);
        assertNotNull(stats.getUpTime().getUnit());
    }
View Full Code Here

TOP

Related Classes of javax.management.j2ee.statistics.JVMStats

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.