Package com.sun.enterprise.config.serverbeans

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


        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

        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

                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

    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

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

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.