Examples of AgentException


Examples of com.sun.enterprise.ee.admin.servermgmt.AgentException

            final ConfigContext configContext = getConfigContext();
            //Validate port number since it is a string...
            try {
                Integer.parseInt(port);
            } catch (NumberFormatException ex) {
                throw new AgentException(_strMgr.getString("portMustBeNumeric",
                    port));
            }

            NodeAgents controllers = ServerBeansFactory.getDomainBean(configContext).getNodeAgents();
View Full Code Here

Examples of com.sun.enterprise.ee.admin.servermgmt.AgentException

            final ConfigContext configContext = getConfigContext();
            // Validate port number since it is a string...
            try {
                Integer.parseInt(port);
            } catch (NumberFormatException ex) {
                throw new AgentException(_strMgr.getString("portMustBeNumeric",
                    port));
            }

            // TODO: get nodeagent to alter, ** need to verify code when dtd is finalized ???
            NodeAgents controllers = ServerBeansFactory.getDomainBean(configContext).getNodeAgents();
View Full Code Here

Examples of com.sun.enterprise.ee.admin.servermgmt.AgentException

        try {
            JMXConnectorConfig config = ServerHelper.getJMXConnectorInfo(configContext,
                instanceName);           
            return new MBeanServerConnectionInfo(config);
        } catch (Exception ex) {
            throw new AgentException(ex);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.ee.admin.servermgmt.AgentException

        }
       
        if (ex instanceof AgentException) {
            result = ex;
        } else {
            result = new AgentException(ex);
        }
        //If the server is unreachable then we want to mark the connection as disabled
        if (isUnreachable(ex)) {
            try {
                NodeAgentRegistry.disconnectNodeAgentConnection(getNodeAgentName());
View Full Code Here

Examples of com.sun.enterprise.ee.admin.servermgmt.AgentException

            throw ex;
        } catch (Exception ex) {
            if (DEBUG) {
                System.out.println("Connection to " + name + " failed " + ex);
            }
            throw new AgentException(ex);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.ee.admin.servermgmt.AgentException

        try {           
            JMXConnectorConfig config = NodeAgentHelper.getJMXConnectorInfo(configContext,
                nodeAgentName);           
            return new MBeanServerConnectionInfo(config);
        } catch (Exception ex) {
            throw new AgentException(ex);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.ee.admin.servermgmt.AgentException

        throws AgentException
    {
        try {
            getNodeAgentRegistry().disconnectCachedConnector(nodeAgentName);
        } catch (IOException ex) {
            throw new AgentException(ex);
        }
    }
View Full Code Here

Examples of com.sun.enterprise.ee.admin.servermgmt.AgentException

        return handleAgentException(ex, messageId, new String[] {arg});
    }
   
    public AgentException handleAgentException(Exception ex, String messageId, String[] args)
    {
        AgentException result = null;
        Level level = Level.FINE;
        if (ex instanceof AgentException) {                       
            result = (AgentException)ex;
        } else if (ex instanceof ConfigException) {           
            result = new AgentException(ex);
        } else
            level = Level.WARNING;
            result = new AgentException(ex);
        }
        StringManagerBase sm = StringManagerBase.getStringManager(getLogger().getResourceBundleName());           
        getLogger().log(level, sm.getString(messageId, args), ex);        
        return result;
    }
View Full Code Here

Examples of kr.or.ioi2002.RMIServer.agent.AgentException

        if (JobType.FEEDBACK.equals(currentJob.getType()))
            return SUBMIT_PROCESS_TIMEOUT;
        if (JobType.TEST.equals(currentJob.getType()))
            return TEST_PROCESS_TIMEOUT;

        throw new AgentException("Invalid job type - not supported by this agent.");
    }
View Full Code Here

Examples of kr.or.ioi2002.RMIServer.agent.AgentException

    private void readResponse() throws AgentException, IOException {
        socket.setSoTimeout(getTimeoutForJobType(currentJob.getType()));
        String command = readLine();
        if (command == null)
            throw new AgentException("RESULT expected, but connection terminated; " + command);
        StringTokenizer tokenizer = new StringTokenizer(command, " ");
        try {
            if (!tokenizer.nextToken().equals("RESULT"))
                throw new AgentException("RESULT expected; " + command);
            assertHasMoreTokens(tokenizer, command);
            String expectedType = currentJob.getType().toString();
            if (JobType.FEEDBACK.equals(currentJob.getType())) {
                expectedType = "GRADE";
            }
            if (!tokenizer.nextToken().equals(expectedType))
                throw new AgentException(currentJob.getType() + " expected; " + command);
            assertHasMoreTokens(tokenizer, command);
            String result = tokenizer.nextToken();
            if (result.equals("OK") || result.equals("FAIL"))
                currentJob.result = result;
            else
                throw new AgentException("OK or FAIL expected;" + command);
            assertHasMoreTokens(tokenizer, command);
            currentJob.setTask(tokenizer.nextToken());
        } catch (NoSuchElementException e) {
            throw new AgentException("NoSuchElementException: error parsing RESULT");
        }
        currentJob.output = recvBytes();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.