Package com.sun.enterprise.config.serverbeans

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


        return gms;
    }
   
    private Properties getGMSConfigProps() throws GMSEventListenerException {
        Properties props = new Properties();
        Config config;
        Cluster cluster;
        ConfigContext configContext;

        try {
            configContext = AdminService.getAdminService().getAdminContext()
                                        .getAdminConfigContext();
            cluster = ClusterHelper.getClusterByName(configContext, clusterName);

            String configRef = cluster.getConfigRef();
            config = ConfigAPIHelper.getConfigByName(configContext, configRef);

            com.sun.enterprise.config.serverbeans.GroupManagementService gmsConfig =
                config.getGroupManagementService();
           
            if(!gmsConfig.isEnabled()){
                String message = _logger.getResourceBundle().
                            getString("clb.gms_not_enabled") + clusterName;
                    throw new GMSEventListenerException(message);
View Full Code Here


    }
   
    private MonitoringLevel getSipMonitoringLevel() {
        String mLevel = "OFF";
        try {
            Config cfg = ServerBeansFactory.getConfigBean(ApplicationServer
                    .getServerContext().getConfigContext());
            MonitoringService monService = cfg.getMonitoringService();

            ElementProperty monLevel = monService.getModuleMonitoringLevels()
                    .getElementPropertyByName(SIPSERVICE_PROPERTY_NAME);
            if (monLevel != null) {
                String val = monLevel.getValue();
View Full Code Here

            ConfigContext ctx = AdminService.getAdminService().
                    getAdminContext().getAdminConfigContext();
            ServerContext sc = com.sun.enterprise.server.ondemand.
                    OnDemandServer.getServerContext();
            ConfigContext instanceConfigContext = sc.getConfigContext();
            Config instanceConfig = ServerBeansFactory.
                    getConfigBean(instanceConfigContext);
            AvailabilityService haService = instanceConfig.
                    getAvailabilityService();
            ConvergedLoadBalancer clb = haService.getConvergedLoadBalancer();
            String clbConfigName = clb.getConvergedLbConfigName();
            clbConfig = ((Domain) ctx.getRootConfigBean()).
                    getConvergedLbConfigs().getConvergedLbConfigByName(
View Full Code Here

    private void init() {
        try {
            // Read the property elements below the sip-service
            ServerContext sc = ApplicationServer.getServerContext();
            Config cfg = ServerBeansFactory.getConfigBean(sc.getConfigContext());

            String servletAdapterClassName = ConfigFactory.getConfig().get(CFG_SIP_SERVICE, SMI_SD_CFG_KEY);
            smiServletAdapter = setAdapterClass(servletAdapterClassName, smiServletAdapter);

            String layerAdapterClassName = ConfigFactory.getConfig().get(CFG_SIP_SERVICE, SMI_NM_CFG_KEY);
View Full Code Here

                    return clbPolicy.getDcrFile();
                }

                ServerContext sc = com.sun.enterprise.server.ondemand.OnDemandServer.getServerContext();
                ConfigContext instanceConfigContext = sc.getConfigContext();
                Config instanceConfig = ServerBeansFactory.getConfigBean(instanceConfigContext);
               
                return instanceConfig.getName() + File.separator + clbPolicy.getDcrFile();
            }
        }

        return null;
    }
View Full Code Here

    }

    public static synchronized void initNonceManager() {
        if (nonceManager == null) {
            try {
                Config cfg = (Config) ServerBeansFactory.getConfigBean(ApplicationServer.getServerContext().getConfigContext());
                SecurityService secService = cfg.getSecurityService();
                ElementProperty[] props = secService.getElementProperty();
                String nonceConfigValue = null;
                String nonceId  = "sip-nonce-config";
                for (ElementProperty value : props) {
                    if ("NonceManager".equalsIgnoreCase(value.getName())) {
View Full Code Here

    }

    public MonitoringLevel getCLBMonitoringLevel() {
        MonitoringLevel monitoringLevel = MonitoringLevel.OFF;
        try {
            Config cfg = ServerBeansFactory.getConfigBean(ApplicationServer
                    .getServerContext().getConfigContext());
            MonitoringService monService = cfg.getMonitoringService();
   
            ElementProperty monLevel = monService.getModuleMonitoringLevels()
                    .getElementPropertyByName(CLB_PROPERTY_NAME);
            if (monLevel != null) {
                String val = monLevel.getValue();
View Full Code Here

        ConfigContext _ctx = e.getConfigContext();
        try {
            if (_ctx == null ) {
                throw new RuntimeException("ConfigContext is null");
            }
            Config config = ServerHelper.getConfigForServer(_ctx,serverName);
            if (config == null ) {
                throw new RuntimeException("ServerHelper.getConfigForServer is null");
            }

            return config.getName();

        } catch (ConfigException ce) {
            throw new SynchronizationException("Unable to resolve configuration name");
        }
View Full Code Here

        if (connectionManager == null) {
            return;
        }
        try {
            ConfigContext configContext = arg0.getConfigContext();
            Config config = ServerBeansFactory.getConfigBean(configContext);
            if (config == null) {
                return;
            }
            KeepAlive keepAlive = config.getHttpService().getKeepAlive();
            connectionManager.setKeepAliveMaxConnections(
                    Long.parseLong(keepAlive.getMaxConnections()));  
            connectionManager.setKeepAliveTimeout(Integer.parseInt(
                    keepAlive.getTimeoutInSeconds()));
        } catch (Exception e) {
View Full Code Here

    ;

    private static synchronized void initNonceManager() {
        if (nonceManager == null) {
            try {
                Config cfg = (Config) ServerBeansFactory.getConfigBean(ApplicationServer.getServerContext().getConfigContext());
                SecurityService secService = cfg.getSecurityService();
                ElementProperty[] props = secService.getElementProperty();
                String nonceConfigValue = null;
                String nonceId  = "sip-nonce-config";
                for (ElementProperty value : props) {
                    if ("NonceManager".equalsIgnoreCase(value.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.