Package com.sun.faban.harness.agent

Examples of com.sun.faban.harness.agent.OracleAgent


        run = r;
        cmdService = c;
        this.oracleHome = oracleHome;
        this.oracleSid = oracleSid;

        OracleAgent oracleAgent = null;

        this.serverMachines = serverMachines;

        try {
            // start OracleAgents on server machines
            for (int i = 0; i < serverMachines.length; i++) {

                logger.fine("Using CmdService to start " +  ORACLE_AGENT + " on " + serverMachines[i]);

                cmdService.startAgent(serverMachines[i], OracleAgentImpl.class, ORACLE_AGENT);

                Thread.sleep(5000);

                // connect to oracleAgent
                String s = ORACLE_AGENT + "@" + serverMachines[i];
                oracleAgent = (OracleAgent) cmdService.getRegistry().getService(s);
                if (oracleAgent == null) {
                    logger.severe("Failed to connect to " + s);
                } else {
                    logger.fine("Connected to " + s);
                    oracleAgent.configure(run, oracleHome, oracleSid, allConfigs);
                    logger.info("Configured " + s);
                    allAgents.put(serverMachines[i], oracleAgent);
                }
            }
        } catch (Exception e) {
View Full Code Here


     */
    public List getConfig(String serverMachine) {

        List l = null;

        OracleAgent oracleAgent = (OracleAgent) allAgents.get(serverMachine);
        if (oracleAgent == null) {
            logger.severe("Unable to find Oracle Agent for " + serverMachine);
        }
        try {
            l = oracleAgent.getConfig(serverMachine);
        }
        catch (Exception e) {
            logger.log(Level.SEVERE, "Failed to get Oracle Config for " +
                    serverMachine + '.', e);

View Full Code Here

            machines[0] = serverMachine;
        else
            machines = serverMachines;

        for(int i = 0; i < machines.length; i++) {
            OracleAgent oracleAgent = (OracleAgent) allAgents.get(machines[i]);
            if (oracleAgent != null) {
                try {
                    oracleAgent.setConfig(machines[i], oracleParams);
                } catch (Exception e) {
                    logger.severe("Failed to set oracleParams of "+ machines[i] + " "  + e);
                    logger.log(Level.FINE, "Exception", e);
                }
            }
View Full Code Here

            machines[0] = serverMachine;
        else
            machines = serverMachines;

        for(int i = 0; i < machines.length; i++) {
            OracleAgent oracleAgent = (OracleAgent) allAgents.get(machines[i]);
            if (oracleAgent != null) {
                try {
                    oracleAgent.stop(machines[i]);
                    oracleAgent.start(machines[i]);
                } catch (Exception e) {
                    logger.severe("Failed to start on " + machines[i] + " " + e.toString());
                    logger.log(Level.FINE, "Exception", e);
                    ret = ret && false;
                }
View Full Code Here

            machines[0] = serverMachine;
        else
            machines = serverMachines;

        for(int i = 0; i < machines.length; i++) {
            OracleAgent oracleAgent = (OracleAgent) allAgents.get(machines[i]);
            if (oracleAgent != null) {
                try {
                    oracleAgent.stop(machines[i]);
                } catch (Exception e) {
                    logger.severe("Failed to stop on " + machines[i] + " " + e);
                    logger.log(Level.FINE, "Exception", e);
                    ret = ret && false;
                }
View Full Code Here

            machines[0] = serverMachine;
        else
            machines = serverMachines;

        for(int i = 0; i < machines.length; i++) {
            OracleAgent oracleAgent = (OracleAgent) allAgents.get(machines[i]);
            if (oracleAgent != null) {
                try {
                    ret  = ret && oracleAgent.startListener();
                } catch (Exception e) {
                    ret = ret && false;
                    logger.severe("Failed to start on machine " + serverMachine + " " + e);
                    logger.log(Level.FINE, "Exception", e);
                }
View Full Code Here

            machines[0] = serverMachine;
        else
            machines = serverMachines;

        for(int i = 0; i < machines.length; i++) {
            OracleAgent oracleAgent = (OracleAgent) allAgents.get(machines[i]);
            if (oracleAgent != null) {
                try {
                    ret  = ret && oracleAgent.stopListener();
                } catch (Exception e) {
                    ret = ret && false;
                    logger.severe("Failed to stop listner on " + machines[i] + " " + e);
                    logger.log(Level.FINE, "Exception", e);
                }
View Full Code Here

     * Start statistics collection.
     * @param serverMachine The server to start the stats collection
     */
    public void startStats(String serverMachine) {

        OracleAgent oracleAgent = (OracleAgent) allAgents.get(serverMachine);
        try {
            oracleAgent.startStats();
        } catch (Exception e) {
            logger.severe("Failed to clear Oracle Stats for " + serverMachine + " " + e);
            logger.log(Level.FINE, "Exception", e);
        }

View Full Code Here

     * Stop statistics collection.
     * @param serverMachine The system to stop stats
     */
    public void stopStats(String serverMachine) {

        OracleAgent oracleAgent = (OracleAgent) allAgents.get(serverMachine);
        try {
            oracleAgent.stopStats();
        } catch (Exception e) {
            logger.severe("Failed to collect Oracle Stats for " + serverMachine + " " + e);
            logger.log(Level.FINE, "Exception", e);
        }

View Full Code Here

     * Clear log files.
     * @param serverMachine The system to call to clear the log file
     */
    public void clearLogs(String serverMachine) {

        OracleAgent oracleAgent = (OracleAgent) allAgents.get(serverMachine);
        try {
            oracleAgent.clearLogs();           
        } catch (Exception e) {
            logger.severe("Failed to clear Oracle Logs for " + serverMachine + " " + e);
            logger.log(Level.FINE, "Exception", e);
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.faban.harness.agent.OracleAgent

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.