Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.ElementProperty


                String hc = th.getClassName();
                ElementProperty[] epList = th.getElementProperty();
                Properties props = new Properties();
                if (epList != null) {
                    for (int i = 0; i < epList.length; i++) {
                        ElementProperty ep = epList[i];
                        String name = ep.getName();
                        String value = ep.getValue();
                        props.setProperty(name, value);
                    }
                }

                if (hc != null) {
View Full Code Here


            ConfigUpdate configUpdate = null;
            ArrayList configChangeList = ue.getConfigChangeList();

            String xpath = null;
            Server serverBean = ServerBeansFactory.getServerBean(configContext);
            ElementProperty elementProperty = null;
            Object object;
            Object configObject;

            for (int i = 0; i < configChangeList.size(); i++) {
                configObject = configChangeList.get(i);
View Full Code Here

                            getConfigContext(), "server");
        JmxConnector jmxConn = as.getJmxConnectorByName(
                                as.getSystemJmxConnectorName());
        jmxConn.setPort(newPort);

        ElementProperty clientHostname =
            jmxConn.getElementPropertyByName(HOST_PROPERTY_NAME);
        clientHostname.setValue(HOST_PROPERTY_NAME, newHost);

        getConfigContext().flush(true);
      
    }
View Full Code Here

            com.sun.enterprise.config.serverbeans.NodeAgent nodeController
        = getNodeAgentConfigBean(getConfigContext());

            if (nodeController != null) {
                Properties props = null;
                ElementProperty elementProperty = null;
                Cluster cluster = null;
                // need a default, can't have %%%DOMAIN_NAME%%% go into
                // running server
                String domainName="DomainPropertyNotFound";
                // set default to "" because this string will actual be placed
                // in the startserv's java command for starting the instance
                // via the ProcessLauncher. This is the easiest way to have the
                // com.sun.aas.clusterName set to null for a standalone Instance
                String clusterArg = "";
               
                for (int ii = 0; ii < servers.length; ii++) {
                    // check to see if the server belongs to this
                    // node agent (repository)
                    if (instanceConfig.getRepositoryName().equals(
                            servers[ii].getNodeAgentRef())) {
                        // check if instance already exists or
                        // needs to be created.
                        if (instanceExists(servers[ii].getName())) {
                            getLogger().log(Level.INFO,
                            "nodeagent.instance.exists", servers[ii].getName());
                        } else {
                            // instance does not exist so create it
                            getLogger().log(Level.INFO,
                            "nodeagent.create.instance", servers[ii].getName());
                            instanceConfig.setInstanceName(servers[ii].getName());
                            // set properties for token replacing startserv scripts
                            props = new Properties();
                            // add proper domain
                            elementProperty = domain.getElementPropertyByName(
                                           DOMAIN_XML_DOMAIN_NAME_PROPERTY_NAME);
                            if (elementProperty != null)
                               domainName=elementProperty.getValue();
                           
                            getLogger().log(Level.INFO,
                                        "domain for instance - " + domainName);
                            props.setProperty(EEScriptsTokens.DOMAIN_NAME,
                                              domainName);
View Full Code Here

        // is a jvm are for synchronization
        String instanceSyncJvmOptions = "";
        try {
            com.sun.enterprise.config.serverbeans.NodeAgent nodeagent
                = getNodeAgentConfigBean(getConfigContext());
            ElementProperty instanceSyncJvmOptionsProperty =
                nodeagent.getElementPropertyByName(INSTANCE_SYNC_JVM_OPTIONS);
            if (instanceSyncJvmOptionsProperty != null)
               instanceSyncJvmOptions=instanceSyncJvmOptionsProperty.getValue();
        } catch (ConfigException ce) {
            getLogger().log(Level.WARNING,
               "nodeagent.synchronization.Exception", ce);
        }
       
View Full Code Here

        JmxConnector jmxConn =
            as.getJmxConnectorByName(as.getSystemJmxConnectorName());
       
        if (!jmxConn.getPort().equals(newPort)) return true;

        ElementProperty clientHostname =
            jmxConn.getElementPropertyByName(HOST_PROPERTY_NAME);
        if (!newHost.equals((String)clientHostname.getValue())) return true;
       
        return false;
    }
View Full Code Here

        try {
            AdminService as = ServerHelper.getAdminServiceForServer(
                                cc, "server");
            JmxConnector config = as.getJmxConnectorByName(
                                      as.getSystemJmxConnectorName());           
            ElementProperty clientHostname = config.getElementPropertyByName(
                                            IAdminConstants.HOST_PROPERTY_NAME);
            if (clientHostname != null) {
                String newHost = (String) clientHostname.getValue();
                NodeAgent[] nas = NodeAgentHelper.getNodeAgentsInDomain(cc);
                for (NodeAgent na : nas)
                    dasHasMoved(newHost, config.getPort(), na);
            }           
        } catch (ConfigException ce) {
View Full Code Here

         //If LazyAssoc is true and LazyEnlist is false, throw exception.
         ElementProperty[] o = (ElementProperty[])adminPool.getValues(ELEMENT_PROPERTY);
         if (o == null) return ;
         ElementProperty lazyEnlistElement = null;
          for (int i=0; i < o.length; i++) {
              if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equalsIgnoreCase("LAZYCONNECTIONENLISTMENT")) {
                  lazyEnlistElement = o[i];
                  break;
              }
          }
             boolean lazyAssoc = toBoolean( lazyAssocString, false );
             if(lazyEnlistElement != null){
                 boolean lazyEnlist = toBoolean(lazyEnlistElement.getValue(),false);
                 if(lazyAssoc){
                     if(lazyEnlist){
                         conConnPool.setLazyConnectionAssoc( true) ;
                         conConnPool.setLazyConnectionEnlist( true);
                     }else{
View Full Code Here

       return sDescription;
    }
   
    public void setElementProperty(String name, String value)
    {
        ElementProperty ep = new ElementProperty();
        ep.setName(name);
        ep.setValue(value);
        vProperty.add(ep);
    }
View Full Code Here

        vProperty.add(ep);
    }

    public void setElementProperty(String name, String value, String sDesc)
    {
        ElementProperty ep = new ElementProperty();
        ep.setName(name);
        ep.setValue(value);
        ep.setDescription(sDesc);
        vProperty.add(ep);
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.ElementProperty

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.