Package com.sun.appserv.management.config

Examples of com.sun.appserv.management.config.NodeAgentConfig


 
    public void
  testCreateRemove()
  {
      final DomainConfig  domainConfig    = getDomainConfig();
      final NodeAgentConfig   nodeAgentConfig = getDASNodeAgentConfig();
     
      if ( nodeAgentConfig == null )
      {
          warning( "SKIPPING ClusteredServerConfigTest.testCreateRemove: " +
              "no DAS Node Agent has been specified; use " +
                  PropertyKeys.DAS_NODE_AGENT_NAME );
      }
      else
      {
          final int NUM   = 5;
          final String    baseName    = "ClusteredServerConfigTest";
         
          verifyRefContainers();
         
          final ClusteredServerConfig[]   servers = new ClusteredServerConfig[ NUM ];
          for( int i = 0; i < NUM; ++i )
          {
              final int   basePort    = 11000 + i * 10;
              servers[ i ]    = createClusteredServer( baseName + "-" + i,
                                  nodeAgentConfig.getName(),
                                  basePort );
              printVerbose( "Created ClusteredServerConfig: " + servers[ i ].getName() );
              assert XTypes.CLUSTERED_SERVER_CONFIG.equals( servers[ i ].getJ2EEType() );
             
              verifyRefContainers();
View Full Code Here


      protected NodeAgentConfig
    getDASNodeAgentConfig()
    {
       final String name    = getDASNodeAgentName();
      
       NodeAgentConfig  config  = null;
       if ( name != null )
       {
            config  = getDomainConfig().getNodeAgentConfigMap().get( name );
       }
      
View Full Code Here

        String realmName = (String)handlerCtx.getInputValue("realmName");
        String configName = (String)handlerCtx.getInputValue("configName");
        String nodeAgentName = (String)handlerCtx.getInputValue("nodeAgentName");
       
        if (!GuiUtil.isEmpty(nodeAgentName)){
            NodeAgentConfig agentConfig = AMXUtil.getDomainConfig().getNodeAgentConfigMap().get(nodeAgentName);
            if (getRealmName){
                handlerCtx.setOutputValue("outName", agentConfig.getJMXConnectorConfig().getAuthRealmName());
            }
            return agentConfig.getContainee(AuthRealmConfig.J2EE_TYPE);
        }else
        if (GuiUtil.isEmpty(realmName) || GuiUtil.isEmpty(configName)){
            GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("realm.internalError"));
            return null;
        }else
View Full Code Here

                    sslContainerConfig = (SSLConfigContainer)iiopConfig;
                }else if(type.equals("http")){
                    HTTPListenerConfig httpConfig = config.getHTTPServiceConfig().getHTTPListenerConfigMap().get(oName);
                    sslContainerConfig = (SSLConfigContainer)httpConfig;
                }else if(type.equals("nodeagent")){
                    NodeAgentConfig agentConfig = AMXUtil.getDomainConfig().getNodeAgentConfigMap().get(oName);
                    JMXConnectorConfig jmxConfig = agentConfig.getJMXConnectorConfig();
                    sslContainerConfig = (SSLConfigContainer)jmxConfig;
                }
               
                SSLConfig sslConfig = sslContainerConfig.getSSLConfig();
                if(sslConfig != null){
View Full Code Here

                        sslContainerConfig = (SSLConfigContainer)iiopConfig;
                    }else if(type.equals("http")){
                        HTTPListenerConfig httpConfig = config.getHTTPServiceConfig().getHTTPListenerConfigMap().get(oName);
                        sslContainerConfig = (SSLConfigContainer)httpConfig;
                    }else if(type.equals("nodeagent")){
                        NodeAgentConfig agentConfig = AMXUtil.getDomainConfig().getNodeAgentConfigMap().get(oName);
                        JMXConnectorConfig jmxConfig = agentConfig.getJMXConnectorConfig();
                        sslContainerConfig = (SSLConfigContainer)jmxConfig;
                    }
                    if((sslContainerConfig != null) && (sslContainerConfig.getSSLConfig() != null)){
                        sslContainerConfig.removeSSLConfig();
                    }
View Full Code Here

            @HandlerOutput(name="clientHostname",       type=String.class)})
           
            public static void getNodeAgentJmxSettings(HandlerContext handlerCtx) {
            String ndAgentName = ((String)handlerCtx.getInputValue("NodeAgentName"));
            Map <String, NodeAgentConfig> nodeAgentMap = AMXUtil.getDomainConfig().getNodeAgentConfigMap();
            NodeAgentConfig agentConfig = nodeAgentMap.get(ndAgentName);
            JMXConnectorConfig connectorConfig = agentConfig.getJMXConnectorConfig();
            handlerCtx.setOutputValue("JmxName", agentConfig.getSystemJMXConnectorName());
            handlerCtx.setOutputValue("JmxProtocol", connectorConfig.getProtocol());
            handlerCtx.setOutputValue("Address", connectorConfig.getAddress());
            handlerCtx.setOutputValue("Port", connectorConfig.getPort());
            handlerCtx.setOutputValue("RealmName", connectorConfig.getAuthRealmName());
            handlerCtx.setOutputValue("Accept", connectorConfig.getAcceptAll());
View Full Code Here

           
            public static void saveNodeAgentJmxSettings(HandlerContext handlerCtx) {
            try{
                String ndAgentName = ((String)handlerCtx.getInputValue("NodeAgentName"));
                Map <String, NodeAgentConfig> nodeAgentMap = AMXUtil.getDomainConfig().getNodeAgentConfigMap();
                NodeAgentConfig agentConfig = nodeAgentMap.get(ndAgentName);
                JMXConnectorConfig connectorConfig = agentConfig.getJMXConnectorConfig();
                String objName = "com.sun.appserv:type=jmx-connector,node-agent=" + ndAgentName + ",category=config";
                JMXUtil.setAttribute(objName, new Attribute("address", handlerCtx.getInputValue("Address")));
                JMXUtil.setAttribute(objName, new Attribute("port", handlerCtx.getInputValue("Port")));
                JMXUtil.setAttribute(objName, new Attribute("auth-realm-name", handlerCtx.getInputValue("RealmName")));
                connectorConfig.setProtocol((String)handlerCtx.getInputValue("JmxProtocol"));
View Full Code Here

            Map <String, NodeAgentConfig> nodeAgentMap = AMXUtil.getDomainConfig().getNodeAgentConfigMap();
            List<Map> selectedList = (List)handlerCtx.getInputValue("selectedRows");
            boolean hasOrig = (selectedList == null || selectedList.size()==0) ? false: true;
            for(String key : nodeAgentMap.keySet()){
                HashMap oneRow = new HashMap();
                NodeAgentConfig agentConfig = nodeAgentMap.get(key);
                String name = agentConfig.getName();
                String agentStatus = agentConfig.getPropertyValue("rendezvousOccurred");
                String hostName = GuiUtil.getMessage("nodeAgent.UnknownHost");
                String status = null;
                if(agentStatus.equalsIgnoreCase("true")){
                    hostName = agentConfig.getJMXConnectorConfig().getPropertyValue("client-hostname");
                    status = getStatusString(name);
                }else{
                    status = getWarningString(GuiUtil.getMessage("nodeAgent.awaitingInitialSync"));
                }
                oneRow.put("name", (name == null) ? " ": name);
View Full Code Here

        List obj = (List) handlerCtx.getInputValue("selectedRows");
        List<Map> selectedRows = (List) obj;
        try{
            for(Map oneRow : selectedRows){
                String name = (String)oneRow.get("name");
                NodeAgentConfig ndAgent = AMXUtil.getDomainConfig().getNodeAgentConfigMap().get(name);
                Object[] params = {name};
                JMXUtil.invoke(NODE_AGENT_OBJNAME, operName, params, signature);
            }
            if (File.separatorChar == '\\'){
                //For Window, there is a timing issue that we need to put in some delay. bug# 6586023
View Full Code Here

     )
     public static void getNodeAgentValues(HandlerContext handlerCtx){
        String ndAgentName = (String) handlerCtx.getInputValue("NodeAgentName");
        try{
            boolean connected = false;
            NodeAgentConfig agentConfig = AMXUtil.getDomainConfig().getNodeAgentConfigMap().get(ndAgentName);
            Map<String, String> props = agentConfig.getProperties();
            String agentStatus = agentConfig.getPropertyValue("rendezvousOccurred");
            String hostName = GuiUtil.getMessage("nodeAgent.UnknownHost");
            String status = null;
            if(agentStatus.equalsIgnoreCase("true")){
                hostName = agentConfig.getJMXConnectorConfig().getPropertyValue("client-hostname");
                connected = true;
                status = getStatusString(agentConfig.getName());
            }else{
                status = getWarningString(GuiUtil.getMessage("nodeAgent.awaitingInitialSync"));
            }
            handlerCtx.setOutputValue("HostName", hostName);
            handlerCtx.setOutputValue("Status", status);
            handlerCtx.setOutputValue("OnInstances", agentConfig.getStartServersInStartup());
            handlerCtx.setOutputValue("Connected", connected);
            handlerCtx.setOutputValue("Properties", props);
        }catch(Exception ex){
            GuiUtil.handleException(handlerCtx, ex);
        }
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.config.NodeAgentConfig

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.