Package org.apache.geronimo.monitoring

Examples of org.apache.geronimo.monitoring.MasterRemoteControlJMX


     *         mbean names Prereq: in order to be a connector or container mbean
     *         the name must contain "Connector"/"Container" and
     *         "Tomcat"/"Jetty"
     */
    private ArrayList<String> getDefaultMBeanList() {
        Set<String> mbeans = (new MasterRemoteControlJMX())
                .getStatisticsProviderMBeanNames();
        ArrayList<String> retval = new ArrayList<String>();
        for (Iterator it = mbeans.iterator(); it.hasNext();) {
            String name = (String) it.next();
            if ((name.contains("Connector") || name.contains("Container"))
View Full Code Here


        // ensure that there is a 'monitoring' directory
        SnapshotConfigXMLBuilder.ensureMonitorDir();
        // get any saved mbean names from snapshot-config.xml
        ArrayList<String> mbeanNames = SnapshotConfigXMLBuilder.getMBeanNames();
        // get a handle on the mrc
        MasterRemoteControlJMX mrc = getMRC(/*username, password*/);
        // in the case where nothing is present, grab a set of default mbeans
        if(mbeanNames.size() <= 0) {
            mbeanNames = getDefaultMBeanList(mrc);
        }
        // turn on all stats in the list
        setStatsOn(mbeanNames, mrc);
        try {
            // take a snapshot
            log.info("======SNAPSHOT======");
            // instantiate map <mbean name, stats for mbean>
            HashMap<String, HashMap<String, Long>> aggregateStats = new HashMap<String, HashMap<String, Long>>();
            // for each mbean name in the list, get its stats
            for(int i = 0; i < mbeanNames.size(); i++) {
                String mbeanName = mbeanNames.get(i);
                HashMap<String, Long> stats = (HashMap<String, Long>)mrc.getStats(mbeanName);
                aggregateStats.put(mbeanName, stats);
            }
           
            // store the data in a DB
            (new SnapshotDBHelper()).addSnapshotToDB(aggregateStats);
View Full Code Here

        // ensure that there is a 'monitoring' directory
        SnapshotConfigXMLBuilder.ensureMonitorDir();
        // get any saved mbean names from snapshot-config.xml
        ArrayList<String> mbeanNames = SnapshotConfigXMLBuilder.getMBeanNames();
        // get a handle on the mrc
        MasterRemoteControlJMX mrc = getMRC(/*username, password*/);
        // in the case where nothing is present, grab a set of default mbeans
        if(mbeanNames.size() <= 0) {
            mbeanNames = getDefaultMBeanList(mrc);
        }
        // turn on all stats in the list
        setStatsOn(mbeanNames, mrc);
        try {
            // take a snapshot
            log.info("======SNAPSHOT======");
            // instantiate map <mbean name, stats for mbean>
            HashMap<String, HashMap<String, Long>> aggregateStats = new HashMap<String, HashMap<String, Long>>();
            // for each mbean name in the list, get its stats
            for(int i = 0; i < mbeanNames.size(); i++) {
                String mbeanName = mbeanNames.get(i);
                HashMap<String, Long> stats = (HashMap<String, Long>)mrc.getStats(mbeanName);
                aggregateStats.put(mbeanName, stats);
            }
           
            // store the data in a DB
            (new SnapshotDBHelper()).addSnapshotToDB(aggregateStats);
View Full Code Here

   
    /**
     * @return An instance of a MRC.
     */
    public static MasterRemoteControlJMX getMRC(/*String username, String password*/) {
        return new MasterRemoteControlJMX();
    }
View Full Code Here

     *         mbean names Prereq: in order to be a connector or container mbean
     *         the name must contain "Connector"/"Container" and
     *         "Tomcat"/"Jetty"
     */
    private ArrayList<String> getDefaultMBeanList() {
        Set<String> mbeans = (new MasterRemoteControlJMX())
                .getStatisticsProviderMBeanNames();
        ArrayList<String> retval = new ArrayList<String>();
        for (Iterator it = mbeans.iterator(); it.hasNext();) {
            String name = (String) it.next();
            if (((name.contains("Connector") || name.contains("Container"))
View Full Code Here

TOP

Related Classes of org.apache.geronimo.monitoring.MasterRemoteControlJMX

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.