Examples of DASConfig


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

        @HandlerOutput(name="AutoDeployDirectory", type=String.class),
        @HandlerOutput(name="Properties", type=Map.class)})    
        public static void getServerAppsConfigAttributes(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        DASConfig dConfig = config.getAdminServiceConfig().getDASConfig();
        boolean reload = dConfig.getDynamicReloadEnabled();
        String reloadInterval = dConfig.getDynamicReloadPollIntervalInSeconds();
        boolean autoDeploy = dConfig.getAutodeployEnabled();
        String adminTimeout = dConfig.getAdminSessionTimeoutInMinutes();
        String autoDeployInterval = dConfig.getAutodeployPollingIntervalInSeconds();
        String autoDeployDirectory = dConfig.getAutodeployDir() ;
        boolean precompile = dConfig.getAutodeployJSPPrecompilationEnabled();
        boolean verifier = dConfig.getAutodeployVerifierEnabled();
        Map<String, String> props = dConfig.getProperties();
        handlerCtx.setOutputValue("Reload", reload);
        handlerCtx.setOutputValue("ReloadInterval", reloadInterval);
        handlerCtx.setOutputValue("AutoDeploy", autoDeploy);
        handlerCtx.setOutputValue("AdminTimeout", adminTimeout);
        handlerCtx.setOutputValue("AutoDeployInterval", autoDeployInterval);
View Full Code Here

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

        @HandlerOutput(name="Precompile", type=Boolean.class),
        @HandlerOutput(name="AutoDeployDirectory", type=String.class)})    
        public static void getServerDefaultAppsConfigAttributes(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        DASConfig dConfig = config.getAdminServiceConfig().getDASConfig();
        String reload = dConfig.getDefaultValue("DynamicReloadEnabled");
        String reloadInterval = dConfig.getDefaultValue("DynamicReloadPollIntervalInSeconds");
        String autoDeploy = dConfig.getDefaultValue("AutodeployEnabled");
        String adminTimeout = dConfig.getDefaultValue("AdminSessionTimeoutInMinutes");
        String autoDeployInterval = dConfig.getDefaultValue("AutodeployPollingIntervalInSeconds");
        String autoDeployDirectory = dConfig.getDefaultValue("AutodeployDir") ;
        String precompile = dConfig.getDefaultValue("AutodeployJSPPrecompilationEnabled");
        String verifier = dConfig.getDefaultValue("AutodeployVerifierEnabled");

        if(reload.equals("true")) {
            handlerCtx.setOutputValue("Reload", true);   
        } else {
            handlerCtx.setOutputValue("Reload", false);
View Full Code Here

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

        @HandlerInput(name="AddProps", type=Map.class),
        @HandlerInput(name="RemoveProps", type=ArrayList.class)})
        public static void saveServerAppsConfigAttributes(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        DASConfig dConfig = config.getAdminServiceConfig().getDASConfig();
        ArrayList removeProps = (ArrayList)handlerCtx.getInputValue("RemoveProps");
        Map addProps = (Map)handlerCtx.getInputValue("AddProps");
        String[] remove = (String[])removeProps.toArray(new String[ removeProps.size()]);
        for(int i=0; i<remove.length; i++){
            dConfig.removeProperty(remove[i]);
        }
        if(addProps != null ){
            Iterator additer = addProps.keySet().iterator();
            while(additer.hasNext()){
                Object key = additer.next();
                String addvalue = (String)addProps.get(key);
                dConfig.setPropertyValue((String)key, addvalue);
               
            }
        }     
        dConfig.setDynamicReloadEnabled(((Boolean)handlerCtx.getInputValue("Reload")).booleanValue());
        dConfig.setDynamicReloadPollIntervalInSeconds((String)handlerCtx.getInputValue("ReloadInterval"));
        dConfig.setAutodeployEnabled(((Boolean)handlerCtx.getInputValue("AutoDeploy")).booleanValue());
        dConfig.setAdminSessionTimeoutInMinutes((String)handlerCtx.getInputValue("AdminTimeout"));
        dConfig.setAutodeployPollingIntervalInSeconds((String)handlerCtx.getInputValue("AutoDeployInterval"));
        dConfig.setAutodeployDir((String)handlerCtx.getInputValue("AutoDeployDirectory")) ;
        dConfig.setAutodeployJSPPrecompilationEnabled(((Boolean)handlerCtx.getInputValue("Precompile")).booleanValue());
        dConfig.setAutodeployVerifierEnabled(((Boolean)handlerCtx.getInputValue("Verifier")).booleanValue());               
    }
View Full Code Here

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

        sessionMap.put("reqNum", GuiUtil.getMessage("msg.JS.enterNumericValue"));
        sessionMap.put("reqPort", GuiUtil.getMessage("msg.JS.enterPortValue"));
        sessionMap.put("_SESSION_INITIALIZED","TRUE");
       
        ConfigConfig config = AMXUtil.getConfig("server-config");
        DASConfig dConfig = config.getAdminServiceConfig().getDASConfig();
        String timeOut = dConfig.getAdminSessionTimeoutInMinutes();

    if((timeOut != null) && (!timeOut.equals(""))) {
      try {
        int time = new Integer(timeOut).intValue();
        if (time == 0) {
View Full Code Here

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

                configBean = new Applications();
            }

            //ROB: config changes
            // use 'appConfigTemp' so that 'appConfig' can be 'final'
            DasConfig appConfigTemp =
                ServerBeansFactory.getDasConfigBean(configContext);
            //RAMAKANTH
            //Why?? what does this mean??
            if (appConfigTemp == null) {
                appConfigTemp = new DasConfig();
            }
           
            appConfig   = appConfigTemp;

        }
View Full Code Here

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

        String strPollingInterval =null ;
        long pollingInterval;                     
        boolean verifyEnabled=false ;
        boolean preJspCompilation=false ;
       
        DasConfig dasConfig = null;
        try {
            //domain = (Domain)confContext.getRootConfigBean();
            //Config config = ServerBeansFactory.getConfigBean(confContext);
            //if(config != null)
            //    as = config.getAdminService();
              dasConfig = ServerBeansFactory.getDasConfigBean(confContext);
        }catch (Exception ce){
                   sLogger.log(Level.SEVERE, "enterprise.deployment.backend.autoDeploymentStartFailure");
                   throw new AutoDeploymentException("Failed to start autodeploy", ce);
        }
       
       // targetConfigurationName= getTargetConfigName(domain);
        //read target configuration
       /* if(targetConfigurationName !=null && !targetConfigurationName.trim().equals("")){
            Config config = domain.getConfigs().getConfigByName(targetConfigurationName);
            if(config !=null){
                //get appconfig specific to targetConfigurationName
                //ApplicationConfig appConfig= config.getApplicationConfig();
        */
             
               
        if(dasConfig != null) {
                boolean autodeployEnabled=dasConfig.isAutodeployEnabled();
                if(autodeployEnabled){                   
                    autoDeployDir=dasConfig.getAutodeployDir() ;
                    if(autoDeployDir != null) {
                        try {
                            autoDeployDir = new PropertyResolver(confContext,
                                context.getInstanceName()).
                                    resolve(autoDeployDir);
                            autoDeployDir=autoDeployDir.trim();
                        } catch (ConfigException ce) {
                            //log
                            autoDeployDir = null;
                        }
                    }
                    if(autoDeployDir == null || "".equals(autoDeployDir)) {
                        //empty path so putting default
                        autoDeployDir = AutoDeployConstants.DEFAULT_AUTODEPLOY_DIR;
                        sourcedir= context.getInstanceEnvironment().getAutoDeployDirPath()+File.separator+autoDeployDir;
                        String msg = localStrings.getString("enterprise.deployment.autodeploy.invalid_source_dir_shifting_to_default",sourcedir);
                        sLogger.log(Level.WARNING, msg);
                    } else if((new File(autoDeployDir)).isAbsolute()) {
                        //absolute path
                        sourcedir=autoDeployDir;
                    } else {
                        //relative path
                        sourcedir= context.getInstanceEnvironment().getAutoDeployDirPath()+File.separator+autoDeployDir;
                    }
                    strPollingInterval = dasConfig.getAutodeployPollingIntervalInSeconds();
                    verifyEnabled=dasConfig.isAutodeployVerifierEnabled() ;
                    preJspCompilation=dasConfig.isAutodeployJspPrecompilationEnabled() ;
                    try {
                        try {
                            pollingInterval= Long.parseLong(strPollingInterval) ;
                            if(pollingInterval < AutoDeployConstants.MIN_POOLING_INTERVAL) {
                                String msg = localStrings.getString("enterprise.deployment.autodeploy.invalid_pooling_interval_shifting_to_default",strPollingInterval,AutoDeployConstants.MIN_POOLING_INTERVAL+"",AutoDeployConstants.DEFAULT_POLLING_INTERVAL+"");
View Full Code Here

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

        ConfigContext configCtx = sc.getConfigContext();

        // applicatons node from server configuration
        Applications applicationsBean  = null;

        DasConfig dasConfig = null;

        // flag used to turn on/off the dynamic monitor thread
        boolean monitor                = false;

        try {
            //ROB: config changes
            //applicationsBean =
               //(Applications)ConfigBeansFactory.getConfigBeanByXPath(configCtx,
                 //                       ServerXPathHelper.XPATH_APPLICATIONS);

            dasConfig = ServerBeansFactory.getDasConfigBean(configCtx);

            //monitor = applicationsBean.isDynamicReloadEnabled();
            monitor = dasConfig.isDynamicReloadEnabled();

        } catch (ConfigException ce) {
            _logger.log(Level.SEVERE,
                "core.config_exception_while_dynamic_reloading", ce);
            monitor = false;
View Full Code Here

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

                if (ApplicationServer.getServerContext() == null) {//verifier
                    validationLevel = DeploymentDescriptorFile.FULL_VALIDATION;
                } else {
                ConfigContext ctx =
                    ApplicationServer.getServerContext().getConfigContext();
                DasConfig dc = ServerBeansFactory.getDasConfigBean(ctx);
                validationLevel = dc.getDeployXmlValidation();
                }
          } catch(ConfigException ce) {
                //ignore error, provide default
                validationLevel = DeploymentDescriptorFile.FULL_VALIDATION;
          }   
View Full Code Here

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

    return;
      }
     
      try {
    ConfigContext ctx = ApplicationServer.getServerContext().getConfigContext();
    DasConfig dc = ServerBeansFactory.getDasConfigBean(ctx);
    validationLevel = dc.getDeployXmlValidation();
      } catch(ConfigException ce) {
    IASDeploymentException e =  new IASDeploymentException(
      localStrings.getString(
      "enterprise.deployment.backend.cannot_get_validationlevel",
      ce.getMessage() ));
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.