Package com.sun.enterprise.config

Examples of com.sun.enterprise.config.ConfigChange


                  return;
              ArrayList configChangeList = event.getConfigChangeList();
              if(configChangeList == null){
                  return;
              }
             ConfigChange change = (ConfigChange) configChangeList.get(0);
             /* if the ConfigChange is an instance of ConfigUpdate, then it
              * means an attribute of the log service is changed.
              * If a property is changed/added/delated it results in
              * ConfigAdd or ConfigDelate
              */
             if (change instanceof ConfigUpdate) {
                 String xPath = change.getXPath();
                 if (!xPath.contains("log-service/element-property"))  { // attr is changed
                     AdminEventMulticaster.notifyFailure(event, AdminEventResult.RESTART_NEEDED);
                     return;
                 }
            }
View Full Code Here


        List changeList = e.getConfigChangeList();
        String[] changeValues = null;
         for (int i =0; i < changeList.size(); i++)
        {
                ConfigChange change = (ConfigChange) changeList.get(i);

                 if (change!= null && change instanceof ConfigUpdate)
                 {
                      changeValues = new String[2];
                      changeValues[0]= ((ConfigUpdate)change).getNewValue(CLB_DCR_FILE);
View Full Code Here

     {
         List changeList = e.getConfigChangeList();
         String[] clbConfigFileNames = null;
         for (int i =0; i < changeList.size(); i++)
        {
                ConfigChange change = (ConfigChange) changeList.get(i);

                 if (change!= null && change instanceof ConfigUpdate)
                 {
                      clbConfigFileNames = new String[2];
                      clbConfigFileNames[0]= ((ConfigUpdate)change).getNewValue(CLB_CONFIG_FILE);
View Full Code Here

        String toCompare =
              "/" + ServerTags.MBEAN +
              "[@" + ServerTags.NAME + "='" + element_id + "']";
        for(int i=0; i<globalChangeList.size(); i++)
        {
            ConfigChange change = (ConfigChange)globalChangeList.get(i);
            String xpath;
            if(change!=null &&
               (xpath=change.getXPath())!=null &&
               xpath.endsWith(toCompare))
               return true;
        }
        return false;
    }
View Full Code Here

        if (configChangeList == null) {
            return match;
        }
        Iterator iter = configChangeList.iterator();
        while (iter.hasNext()) {
            ConfigChange change = (ConfigChange)iter.next();
            String xpath = change.getXPath();
            if (xpath != null) {
                Matcher matcher = pattern.matcher(xpath);
                match = matcher.matches();
                if (match) {
                    setConfigChangeMatched(change);
View Full Code Here

        _logger.log(Level.FINE,"sgmt.reconfig_handlecreatereceived");
        try{            
            ConfigContext configContext = event.getConfigContext();
            Config config = ServerBeansFactory.getConfigBean(configContext);
            ConfigAdd configAdd = null;
            ConfigChange configChange = null;
            ArrayList<ConfigChange> configChangeList = event.getConfigChangeList();
            ManagementRule rule = null;
            String xpath = null;
            String pXPath = null;
            Object object;
            String ruleName = null;
            for (int i=0; i < configChangeList.size(); i++){
                configChange = configChangeList.get(i);
                if (configChange instanceof ConfigAdd) {
                    _logger.log(Level.INFO,"sgmt.reconfig_handlecreaterulereceived");
                    xpath = configChange.getXPath();
                    if (xpath != null) {
                        _logger.log(Level.INFO, "sgmt.reconfig_handlexpath",xpath);
                        rule = (ManagementRule)configContext.exactLookup(xpath);
                        if (rule.isEnabled())
                            service.addRule(rule, configContext);
                        else
                            service.addDisabledRule(rule);
                      
                    }
                } else if(configChange instanceof ConfigSet) {
                    //handle action addition
        pXPath = configChange.getParentXPath();
        String name = configChange.getName();
        if (name.equals(ManagementRule.ACTION)) {
            _logger.log(Level.INFO,"smgt.handleactionadd",pXPath);
            rule = (ManagementRule)configContext.exactLookup(pXPath);
            service.handleActionAdd(rule, configContext);
                    }
View Full Code Here

            for (int i=0; i < configChangeList.size(); i++){
          if (configChangeList.get(i) instanceof ConfigAdd ||
        configChangeList.get(i) instanceof ConfigSet ||
        configChangeList.get(i) instanceof ConfigDelete) {
        ConfigChange change = configChangeList.get(i);
        xPath =  change.getXPath();
          } else {
                    configUp = configChangeList.get(i);
                    xPath = configUp.getXPath();
          }
                if (xPath!=null) {
View Full Code Here

    public String getConfigChangeInfo() {
        StringBuffer buf = new StringBuffer();
        if (configChangeList != null) {
            Iterator iter = configChangeList.iterator();
            while (iter.hasNext()) {
                ConfigChange change = (ConfigChange)iter.next();
                buf.append(change.toString());
            }
        }
        return buf.toString();
    }
View Full Code Here

            dfltEvent.setInitOrObjConfChanged(true);
        }
        if (changeList != null && !changeList.isEmpty()) {
            iter = changeList.iterator();
            while (iter.hasNext()) {
                ConfigChange change = (ConfigChange)iter.next();
                if (change != null) {
                    doChangeBucketing(change, dfltEvent, changeList);
                }
            }
        }
View Full Code Here

            throw new IllegalStateException( msg );
        }
        logger.log(Level.FINE, EXTRACT_CHANGE, xpath);
        Iterator iter = allChanges.iterator();
        while (iter.hasNext()) {
            ConfigChange change = (ConfigChange)iter.next();
            logger.log(Level.FINE, PROCESS_CHANGE, change);
            String changeXPath = null;
            if (change != null) {
                changeXPath = cleanXPath(change.getXPath());
                logger.log(Level.FINEST, CONFIG_CHANGE_XPATH, changeXPath);
            }
            if (change == null || changeXPath == null) {
                logger.log(Level.FINE, CHANGE_NULL, change);
                continue;
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.ConfigChange

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.