Package com.sun.enterprise.admin.servermgmt

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


        private RuntimeStatus _status;
       
        public GetRuntimeStatusTask(String serverName) {
            super(TIMEOUT_IN_MILLIS);
            _serverName = serverName;
            _status = new RuntimeStatus(_serverName);
        }
View Full Code Here


            } catch (InstanceException ex) {
                StringManagerBase sm = StringManagerBase.getStringManager(
                    getLogger().getResourceBundleName());        
                getLogger().log(Level.WARNING,
                    sm.getString("eeadmin.listInstances.Exception", _serverName), ex);
                _status = new RuntimeStatus(_serverName);
            }           
        }
View Full Code Here

        try
        {                      
            boolean restartRequired = false;
            final String[] servers = getServersForConfig(configName);
            ServersConfigBean cmb = getServersConfigBean()
            RuntimeStatus status = null;
            for (int i = 0; i < servers.length; i++)
            {
                try {
                    status = cmb.getRuntimeStatus(servers[i]);
                } catch (InstanceException ie) {
                    // ignore instance exceptions and assume
                    // server is down and will be restarted.
                    // call node agent api to figured out
                    // if the server is restarted through node agent
                    // or manurally started
                }

                if ((status != null) && (!status.isStopped()) && (status.isRestartNeeded())) {
                    restartRequired = true;
                    break;
                }
            }   
            return restartRequired;
View Full Code Here

   
    private static String getStatusString(String nodeAgentName) {
        String status = null;
        try{
            String objName = "com.sun.appserv:type=node-agent,name=" + nodeAgentName + ",category=config";
            RuntimeStatus sts = (RuntimeStatus)JMXUtil.invoke(objName, "getRuntimeStatus", null, null);
            if (sts == null) {
                status = getWarningString(GuiUtil.getMessage("nodeAgent.unknownState"));
            }else if (sts instanceof RuntimeStatus) {
                status = JMXUtil.getStatusForDisplay(objName);
            }
View Full Code Here

            ObjectName on = new ObjectName("com.sun.appserv:type=cluster,name=" + targetName +
        ",category=config");
            if (ServerHelper.isAServer(ctx, targetName)) {
                on = new ObjectName("com.sun.appserv:type=server,name=" + targetName +
        ",category=config");
                RuntimeStatus rtStatus = (RuntimeStatus) MBeanServerFactory.getMBeanServer().invoke(
        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

Related Classes of com.sun.enterprise.admin.servermgmt.RuntimeStatus

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.