Package com.sun.enterprise.config.serverbeans

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


            return;
        }

        try {
            ConfigContext configContext = event.getConfigContext();
            Config config = ServerBeansFactory.getConfigBean(configContext);
            if (config == null) {
                return;
            }
            webContainer.updateHttpService(config.getHttpService(),
                                           configContext);
        } catch (Exception e) {
           throw new AdminEventListenerException(e);
        }
    }
View Full Code Here


            return;
        }

        try {
            ConfigContext configContext = event.getConfigContext();
            Config config = ServerBeansFactory.getConfigBean(configContext);
            if (config == null) {
                return;
            }
            webContainer.updateHttpService(config.getHttpService(),
                                           configContext);
        } catch (Exception e) {
           throw new AdminEventListenerException(e);
        }
    }
View Full Code Here

            return;
        }

        try {
            ConfigContext configContext = event.getConfigContext();
            Config config = ServerBeansFactory.getConfigBean(configContext);
            if (config == null) {
                return;
            }
            webContainer.updateHttpService(config.getHttpService(),
                                           configContext);
        } catch (Exception e) {
           throw new AdminEventListenerException(e);
        }
    }
View Full Code Here

            return;
        }

        try {
            ConfigContext configContext = event.getConfigContext();
            Config config = ServerBeansFactory.getConfigBean(configContext);
            if (config == null) {
                return;
            }
            webContainer.updateHttpService(config.getHttpService(),
                                           configContext);
        } catch (Exception e) {
           throw new AdminEventListenerException(e);
        }
    }
View Full Code Here

    /**
    * Get the availability-service element from domain.xml.
    * return null if not found
    */   
    protected AvailabilityService getAvailabilityService() {
        Config configBean = this.getConfigBean();
        if(configBean == null) {
            return null;
        }
        return configBean.getAvailabilityService();
    }
View Full Code Here

    /**
    * Get the config element from domain.xml.
    * return null if not found
    */    
    private Config getConfigBean() {
        Config configBean = null;
        ServerContext serverCtx = ApplicationServer.getServerContext();
        ConfigContext configCtx = serverCtx.getConfigContext();
        try {
            configBean = ServerBeansFactory.getConfigBean(configCtx);
        } catch (ConfigException ex) {}
View Full Code Here

            _serverBean = ServerBeansFactory.getServerBean(_configContext);

            getDynamicReloadingSettings(ServerBeansFactory.getDasConfigBean(_configContext));

            Config cfg = ServerBeansFactory.getConfigBean(_configContext);
            logService = cfg.getLogService();
            initLogLevel(logService);
            initMonitoringLevel(cfg.getMonitoringService());

            ElementProperty maxDepth
                = ServerBeansFactory.getWebContainerBean(_configContext).getElementPropertyByName(DISPATCHER_MAX_DEPTH);
            if (maxDepth != null && maxDepth.getValue() != null) {
View Full Code Here

           
            if (configName != null) {                    
                //A shared cluster has its configuration pre-created.
                //Get the configuration specified by configName and ensure that it exists
                //is valid.
                Config config = validateSharedConfiguration(configContext, configName);
                cluster.setConfigRef(configName);
                //add system properties into cluster element itself
                if (props != null) {           
                    for (Enumeration e = props.propertyNames(); e.hasMoreElements() ;) {
                        String propName = (String)e.nextElement();
View Full Code Here

            //list config properties
            if (inherit) {
                final Domain domain = ConfigAPIHelper.getDomainConfigBean(configContext);
                addProperties(result, domain.getSystemProperty());
            }
            final Config config = ConfigAPIHelper.getConfigByName(configContext,
                target.getName());
            addProperties(result, config.getSystemProperty());           
        } else if (target.getType() == TargetType.CLUSTER) {           
            //list cluster properties
            if (inherit) {
                final Domain domain = ConfigAPIHelper.getDomainConfigBean(configContext);         
                addProperties(result, domain.getSystemProperty());
                final Config config = ClusterHelper.getConfigForCluster(configContext,
                    target.getName());
                addProperties(result, config.getSystemProperty());
            }
            final Cluster cluster = ClusterHelper.getClusterByName(configContext,
                target.getName());
            addProperties(result, cluster.getSystemProperty());
        } else if (target.getType() == TargetType.SERVER ||
            target.getType() == TargetType.DAS) {           
            //list server properties
            final Server server = ServerHelper.getServerByName(configContext,
                target.getName());
            if (inherit) {
                final Domain domain = ConfigAPIHelper.getDomainConfigBean(configContext);           
                addProperties(result, domain.getSystemProperty());

                final Config config = ConfigAPIHelper.getConfigByName(configContext, server.getConfigRef());
                addProperties(result, config.getSystemProperty());
                if (ServerHelper.isServerClustered(configContext, target.getName()))  {
                    final Cluster cluster = ClusterHelper.getClusterForInstance(configContext,
                        target.getName());
                    addProperties(result, cluster.getSystemProperty());
                }       
View Full Code Here

                    }
                    domain.addSystemProperty(getSystemProperty(props, name),
                        OVERWRITE);
                }     
            } else if (target.getType() == TargetType.CONFIG) {
                final Config config = ConfigAPIHelper.getConfigByName(configContext, 
                    target.getName());                  
                //Add the properties
                for (Enumeration e = props.propertyNames(); e.hasMoreElements();) {
                    final String name = (String)e.nextElement();
                    //If the property exists, remove it
                    final SystemProperty sysProp = config.getSystemPropertyByName(name);
                    if (sysProp != null) {
                        config.removeSystemProperty(sysProp, OVERWRITE);
                    }
                    config.addSystemProperty(getSystemProperty(props, name),
                        OVERWRITE);
                }                     
            } else if (target.getType() == TargetType.CLUSTER) {
                final Cluster cluster = ClusterHelper.getClusterByName(configContext,
                    target.getName());
View Full Code Here

TOP

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

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.