Examples of JMXConnectorConfig


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

                String type = (String)handlerCtx.getInputValue("Type");
                SSLConfigContainer sslContainerConfig = null;
                boolean isEdit = ((Boolean)handlerCtx.getInputValue("Edit")).booleanValue();
                if(isEdit){
                    if(type.equals("jmx")){
                        JMXConnectorConfig jmxConfig = config.getAdminServiceConfig().getJMXConnectorConfigMap().get(oName);
                        sslContainerConfig = (SSLConfigContainer)jmxConfig;
                    }else if(type.equals("iiop")){
                        IIOPListenerConfig iiopConfig = config.getIIOPServiceConfig().getIIOPListenerConfigMap().get(oName);
                        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

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

           
            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());
            handlerCtx.setOutputValue("security", connectorConfig.getSecurityEnabled());
            String client="";
            if (connectorConfig.existsProperty("client-hostname"))
                client = connectorConfig.getPropertyValue("client-hostname");
            handlerCtx.setOutputValue("clientHostname", client);
        }
View Full Code Here

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

            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"));
                connectorConfig.setAcceptAll((Boolean)handlerCtx.getInputValue("Accept"));
                connectorConfig.setSecurityEnabled((Boolean)handlerCtx.getInputValue("security"));
                String clientHostname = (String) handlerCtx.getInputValue("clientHostname");
                AMXUtil.changeProperty(connectorConfig, "client-hostname", clientHostname);
            }catch(Exception ex){
                GuiUtil.handleException(handlerCtx, ex);
            }
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

     */
    public Boolean call() throws Exception {
        boolean isHealthy = true;
       
        String address = listener.getAddress();
        JMXConnectorConfig jmxCfg = null;
        String urlString = null;
        ConfigContext configCtx = InstanceHangAction.configCtx;
       
        try {
            if (address.equals(ANY_ADDR)) {
                jmxCfg = ServerHelper.getJMXConnectorInfo(configCtx,server.getName());
                address = jmxCfg.getHost();
            }
       
            boolean sslEnabled = listener.isSecurityEnabled();
            if (sslEnabled) {
                // ssl connection   
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

     * @author  sridatta.viswanath@sun.com
     */
    public static String getHostNameForServerInstance(String serverName)
    {
        try {
            JMXConnectorConfig info =
    ServerHelper.getJMXConnectorInfo(configCtx, serverName);
            _logger.log(Level.FINE,
      baseMsg + ".getHostNameForServerInstance: " +
      "found info: " + info.toString());
      String host = info.getHost();
            _logger.log(Level.FINE,
      baseMsg + ".getHostNameForServerInstance: " +
      "found host: " + host);
            return host;
        } catch (Throwable e){
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

        ConfigContext cc = AdminService.getAdminService().getAdminContext().getAdminConfigContext();
        if(cc==null) {
            return(getWebServerInfoForDAS(request));
        }
        Config config = ServerHelper.getConfigForServer(cc, serverTarget);
        JMXConnectorConfig info = ServerHelper.getJMXConnectorInfo(cc, serverTarget);
        if((config==null) || (info==null) ) {
            return(getWebServerInfoForDAS(request));
        }
        String host = info.getHost();
        return(getWebServerInfo(cc, config, null, serverTarget, host));
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

            else {
                try {
                    ConfigContext cfgCtx = ApplicationServer.getServerContext().
                                                getConfigContext();
                    assert(cfgCtx != null);
                    JMXConnectorConfig jmxConfig = ServerHelper.
                        getJMXConnectorInfo(cfgCtx, instanceName);
                    if ( jmxConfig == null ) {
                        String msg = _localStrMgr.getString("JMXInfoNotFound",
                            instanceName);
                        throw new RuntimeException(msg);
                    }                                      


        /* Need a better way of handling connector configuration */
                    final JMXServiceURL theUrl =
                    JmxServiceUrlFactory.forRmiWithJndiInAppserver(
                        jmxConfig.getHost(),
                        Integer.parseInt(jmxConfig.getPort()));
                    url = theUrl.toString();
                } catch (ConfigException ce) {
                    throw new SynchronizationException(
                    _strMgr.getString(
                        "synchronization.api.jmx_config_ctor_failed",
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

        ElementProperty hostProp = connector.getElementPropertyByName(HOST_PROPERTY_NAME);   

        if (adminUser == null || adminPassword == null || hostProp == null) {
            throw new ConfigException(_strMgr.getString("missingAgentConnectorAuth", nodeAgentName));
        }
        return new JMXConnectorConfig(hostProp.getValue(), connector.getPort(),                
            adminUser, adminPassword, connector.getProtocol());
    }
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

                                domainXml.getAbsolutePath());                       
                        String dasName =
                            ServerHelper.getDAS(configContext).getName();           
                        Config dasConfig = ServerHelper.getConfigForServer(
                                                configContext, dasName);
                        JMXConnectorConfig dasInfo =
                            ServerHelper.getJMXConnectorInfo(configContext, 
                                                             dasName);
                        String dasPort =
                            dasConfig.getHttpService().getHttpListenerById(
                            "admin-listener").getPort();
                        String dasHost = dasInfo.getHost();                       
                       
                        getLogger().log(Level.FINE, "dasHost: " + dasHost +
                              " dasPort: " + dasPort + " dasHost2: " + dasHost2
                            + " dasPort2: " + dasPort2);
                       
View Full Code Here

Examples of com.sun.enterprise.admin.util.JMXConnectorConfig

       
        if(ok(pw))
            setAdminPassword(pw);
        try
        {
            JMXConnectorConfig config = ServerHelper.getJMXConnectorInfo(configCtx,
                ServerHelper.getDAS(configCtx).getName());
            dasPassword = config.getPassword();
            setAdminPassword(dasPassword);
            pw = adminPassword;
            setSystemPassword(pw);
            setDatabasePassword(pw);
            setDatabaseUser(config.getUser());
            adminPasswordManager    = new PasswordManager(this, Constants.ADMINPASSWORD, adminPassword);
            dbPasswordManager       = new PasswordManager(this, Constants.DBPASSWORD, dbPassword);
        }
        catch (Exception e)
        {
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.