Examples of RuntimeStatusList


Examples of com.sun.enterprise.admin.servermgmt.RuntimeStatusList

    }

    public RuntimeStatusList stopCluster(String clusterName)
        throws InstanceException
    {
        RuntimeStatusList beforeStatus = getRuntimeStatus(clusterName);
        if (beforeStatus.isEmpty()) {
            //no instances
            throw new InstanceException(_strMgr.getString("clusterIsEmpty",
                clusterName));
        }

        doStopCluster(clusterName);
       
        RuntimeStatusList afterStatus = getRuntimeStatus(clusterName);
        if (afterStatus.anyRunning()) {
            throw new InstanceException(_strMgr.getString("clusterNotFullyStopped",
                clusterName));
        }

        for(int i = 0; i < afterStatus.size(); i++) {
            // this will get us a special error message from RuntimeStatus.toString()
            afterStatus.getStatus(i).setStopClusterFlag(beforeStatus.getStatus(i));
        }

        return afterStatus;
    }
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.RuntimeStatusList

        for (int i = 0; i < servers.length; i++) {
            tasks[i] = new GetRuntimeStatusTask(servers[i]);
        }
        Executor exec = new Executor(tasks);
        exec.run();
        RuntimeStatusList result = new RuntimeStatusList(servers.length);
        for (int i = 0; i < servers.length; i++) {
            result.add(tasks[i].getStatus());
        }       
        return result;
    }   
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.RuntimeStatusList

            final Server[] servers = target.getServers();         
            final int numServers = servers.length;           
            ArrayList result = new ArrayList();
            String serverName = null;
            int status;           
            RuntimeStatusList statusList = null;
            if (andStatus) {               
                //Fetch the status of all the server instances in parallel
                statusList = getRuntimeStatus(servers);               
            }
            for (int i = 0; i < numServers; i++) {               
                serverName = servers[i].getName();
                if (andStatus) {
                    //Do not display the DAS as a server instance
                    if (!ServerHelper.isDAS(configContext, serverName)) {                                              
                        result.add(stringMgr.getString("listInstanceElement", serverName,
                            statusList.getStatus(i).toShortString()));                       
                    }
                } else {
                    result.add(serverName);
                }
            }           
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.RuntimeStatusList

        try {           
            final Server[] servers = ServerHelper.getUnclusteredServers(
                configContext, excludeDASInstance);           
            ArrayList result = new ArrayList();
            String serverName;
            RuntimeStatusList statusList = null;
            if (andStatus) {               
                //Fetch the status of all the server instances in parallel
                statusList = getRuntimeStatus(servers);               
            }
            for (int i = 0; i < servers.length; i++) {               
                serverName = servers[i].getName();
                if (andStatus) {                    
                    result.add(stringMgr.getString("listInstanceElement", serverName,
                        statusList.getStatus(i).toShortString()));                   
                } else {
                    result.add(serverName);
                }               
            }
            return (String[])result.toArray(new String[result.size()]);
View Full Code Here

Examples of com.sun.enterprise.admin.servermgmt.RuntimeStatusList

        on, "getRuntimeStatus", null, null);
    if ((rtStatus != null) && (rtStatus.getStatus() != null)) {
        status = rtStatus.getStatus().getStatusString();
    }
            } else {
                RuntimeStatusList rtStatus = (RuntimeStatusList) MBeanServerFactory.getMBeanServer().invoke(
      on, "getRuntimeStatus", null, null);
    if (rtStatus != null) {
        status = rtStatus.toString();
        if (Status.getStatusString(Status.kClusterPartiallyRunningCode).equals(status)) {
      status = Status.getStatusString(Status.kInstanceRunningCode);
        }
    }
            }
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.