Package com.sun.enterprise.ee.admin.mbeanapi

Examples of com.sun.enterprise.ee.admin.mbeanapi.NodeAgentMBean


    private void dasHasMoved(
        String newHost, String newPort, NodeAgent na) {
       
        try {
            NodeAgentMBean agentMBean =
                NodeAgentProxy.getNodeAgentProxy(na.getName());
            agentMBean.dasHasMoved(newHost, newPort);
        } catch (AgentException ex) {
            _logger.log(Level.WARNING, _strMgr.getString(
                "notifier.nodeagent_notify_error", na.getName()));
        } catch (MBeanException me) {
            _logger.log(Level.WARNING, _strMgr.getString(
View Full Code Here


        try {
            agentName = getNodeAgentName();
           // do the context flush
           flushAll();
           // call node agent mbean to synchronize
           NodeAgentMBean agentMBean = NodeAgentProxy.getNodeAgentProxy(
                            agentName);
           agentMBean.synchronizeWithDAS();
        } catch(ConfigException ce) {
            getLogger().log(Level.WARNING,"eeadmin.nodeagentconfig.flush_failed");
        } catch(AgentException ae) {
            getLogger().log(Level.WARNING,"eeadmin.nodeagentconfig.agent_exp",
                        agentName);
View Full Code Here

    }

    public void clearRuntimeStatus(String agentName) throws AgentException
    {
        try {
            NodeAgentMBean agentMBean = NodeAgentProxy.getNodeAgentProxy(agentName);
            agentMBean.clearRuntimeStatus();
        } catch (Exception ex) {
            //Ignore any error indicating that the server is unreachable.
            //FIXTHIS: We could expect the proxy to do this for us as it
            //seems to be a common case.
            if (NodeAgentProxy.isUnreachable(ex)) {
View Full Code Here

    }

    public RuntimeStatus getRuntimeStatus(String agentName) throws AgentException
    {
        try {
            NodeAgentMBean agentMBean = NodeAgentProxy.getNodeAgentProxy(agentName);
            return agentMBean.getRuntimeStatus();
        } catch (Exception ex) {
            //Ignore any error indicating that the server is unreachable.
            //FIXTHIS: We could expect the proxy to do this for us as it
            //seems to be a common case.
            if (NodeAgentProxy.isUnreachable(ex)) {
View Full Code Here

            //1) we need a system jmx-connector from the DAS from which to obtain host, port
            //and protocol. This is not yet re-integrated
            //2) we need a place to store the DAS authentication information -- new properties
            //in domain.xml

            NodeAgentMBean agentMBean = NodeAgentProxy.getNodeAgentProxy(nodeAgentName);
            agentMBean.synchronizeWithDAS();

            // clear the JMXConnectorRegistry cache, do not want to leave unused connections around
            NodeAgentRegistry.removeNodeAgentConnection(nodeAgentName);
        } catch (Exception ex) {
            throw getExceptionHandler().handleAgentException(
View Full Code Here

        try {
            agentName = getNodeAgentName();
           // do the context flush
           flushAll();
           // call node agent mbean to synchronize
           NodeAgentMBean agentMBean = NodeAgentProxy.getNodeAgentProxy(
                            agentName);
           agentMBean.synchronizeWithDAS();
        } catch(ConfigException ce) {
            getLogger().log(Level.WARNING,"eeadmin.nodeagentconfig.flush_failed");
        } catch(AgentException ae) {
            getLogger().log(Level.WARNING,"eeadmin.nodeagentconfig.agent_exp",
                        agentName);
View Full Code Here

                } else {
                    String installRoot = System.getProperty(
                    SystemPropertyConstants.INSTALL_ROOT_PROPERTY);
                    String instanceRoot = System.getProperty(
                    SystemPropertyConstants.INSTANCE_ROOT_PROPERTY);
                    NodeAgentMBean agentMBean = NodeAgentProxy.getNodeAgentProxy(agentName);                       
                    agentMBean.startInstance(serverName, props);       
                }
            } else {
                throw new InstanceException(_strMgr.getString("agentNotRunning",
                    agentName, serverName));
            }
View Full Code Here

            String agentName = controller.getName();
                      
            // Call the Node Agent to stop the server instance remotely
            NodeAgentsConfigBean ncb = getNodeAgentsConfigBean();
            if (ncb.isRunning(agentName)) {
                    NodeAgentMBean agentMBean =
                        NodeAgentProxy.getNodeAgentProxy(agentName);
                    if (forcekill) {
                        agentMBean.stopInstance(serverName, timeout);
                    } else {
                        agentMBean.stopInstance(serverName);
                    }
            } else throw new InstanceException(
                   _strMgr.getString("agentNotRunning", agentName, serverName));           
        } catch (Exception ex) {
            throw getExceptionHandler().handleInstanceException(
View Full Code Here

            //as an event notification (TBD) we need this to happen before notifying or
            //the Node Agent will not synchronize the correct data.
            //QUESTION: What happens if an exception is thrown above (e.g. in addNodeAgent). How do
            //we restore the admin config context to its previous (and unpersisted value)???
            flushAll();
            NodeAgentMBean agentMBean = NodeAgentProxy.getNodeAgentProxy(controller.getName());                       
            agentMBean.synchronizeWithDAS();
        } catch (Exception ex) {
            throw getExceptionHandler().handleInstanceException(
                ex, "eeadmin.deleteServerInstance.Exception", serverName);
        } finally {
            ConfigContextImpl.unlock();
View Full Code Here

            //as an event notification (TBD) we need this to happen before notifying or
            //the Node Agent will not synchronize the correct data.
            //QUESTION: What happens if an exception is thrown above (e.g. in addNodeAgent). How do
            //we restore the admin config context to its previous (and unpersisted value)???
            flushAll();
            NodeAgentMBean agentMBean = NodeAgentProxy.getNodeAgentProxy(nodeAgentName);                       
            agentMBean.synchronizeWithDAS();                          
        } catch (Exception ex) {
            throw getExceptionHandler().handleInstanceException(
                ex, "eeadmin.createServerInstance.Exception", serverName);
        } finally {
            ConfigContextImpl.unlock();
View Full Code Here

TOP

Related Classes of com.sun.enterprise.ee.admin.mbeanapi.NodeAgentMBean

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.