Examples of LbConfig


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

        String lbConfigName = lb.getLbConfigName();
        Map<String, LBConfig> lbConfigMap = mDomainConfig.getLBConfigMap();
        if ((lbConfigMap == null) || (lbConfigName == null) ){
            return null;
        }
        LBConfig lbConfig = (LBConfig) lbConfigMap.get(lbConfigName);
        if (lbConfig == null) {
            return null;
        }
        Map<String,ClusterRefConfig> cRefMap =
                lbConfig.getClusterRefConfigMap();
       
        if ( cRefMap != null) {
            targetSet.addAll(cRefMap.keySet());
        }
        Map<String,ServerRefConfig> sRefMap =
                    lbConfig.getServerRefConfigMap();
        
        if ( sRefMap != null) {
            targetSet.addAll(sRefMap.keySet());
        }
       
View Full Code Here

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

        try {
            long lbTimeout = 0;
           
            ConfigContext cfgCtx = ApplicationServer.getServerContext().getConfigContext();
            Set<LbConfig> lbs = ServerBeansFactory.getLbConfigs(cfgCtx);
            LbConfig selectLb = null;
            for ( LbConfig lb : lbs) {
                if (lb.getClusterRefByRef(clusterName)!= null) {
                    selectLb = lb;
                    break;
                }
                if (lb.getServerRefByRef(instanceName)!= null) {
                    selectLb = lb;                   
                    break;
                }
            }
       
            if (selectLb != null) {
                String val = selectLb.getResponseTimeoutInSeconds();
                lbTimeout = Long.parseLong(val);
            }
           
            if (lbTimeout == 0) {
                //standalone
View Full Code Here

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

        if (lbs== null) {
            // return, no lb configs
            return null;
        }
        LbConfig lbConfig = lbs.getLbConfigByName(configName);
        if (lbConfig == null) {
            return null;
        }
        ClusterRef[] cRefs = lbConfig.getClusterRef();
        for (int j =0; j < cRefs.length; j++) {
                sList.add(cRefs[j].getRef());    
        }
        String[] strList = new String[sList.size()];
        return ( String [] ) sList.toArray(strList);
View Full Code Here

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

        if (lbs== null) {
            // return, no lb configs
            return null;
        }
        LbConfig lbConfig = lbs.getLbConfigByName(configName);
        if (lbConfig == null) {
            return null;
        }
        ServerRef[] sRefs = lbConfig.getServerRef();
        for (int j =0; j < sRefs.length; j++) {
                sList.add(sRefs[j].getRef());    
        }
        String[] strList = new String[sList.size()];
        return ( String [] ) sList.toArray(strList);
View Full Code Here

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

        if (lbConfigs == null) {
             return ;
         }

        LbConfig lbConfig = lbConfigs.getLbConfigByName(LBNAME);

        impl = new LoadbalancerReaderImpl(ctx,lbConfig);

    }
View Full Code Here

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

        if (lbConfigs == null) {
             return ;
         }

        LbConfig lbConfig = lbConfigs.getLbConfigByName(LBNAME);
        ClusterRef cRef = lbConfig.getClusterRefByRef(CLNAME);

        impl = new ClusterReaderImpl(ctx,cRef);

    }
View Full Code Here

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

     */
    public static LoadbalancerReader getLbReader(ConfigContext ctx,
        String lbConfigName) throws ConfigException, Schema2BeansException{

        // reads the load balancer related data
        LbConfig lbConfig = ((Domain)ctx.getRootConfigBean()).getLbConfigs().
                                getLbConfigByName(lbConfigName);
        return new LoadbalancerReaderImpl(ctx,lbConfig);

    }
View Full Code Here

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

                } else if (ServerHelper.isAServer(ctx, target)) {
                    names = getLBConfigsForServer(target);

                } else {

                    LbConfig lbConfig = lbConfigs.getLbConfigByName(target);

                    // target is a lb config
                    if (lbConfig != null) {
                        String[] clusters = getClustersInLBConfig(target);
                        String[] servers = getServersInLBConfig(target);
View Full Code Here

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

        if (lbConfigs == null ) {
            _logger.log(Level.FINE,_sMgr.getString(
                    "http_lb_admin.NoLbConfigs"));
            return null;
        }
        LbConfig lbConfig = lbConfigs.getLbConfigByName(name);
        if (lbConfig == null ) {
            _logger.log(Level.FINE,_sMgr.getString(
                    "http_lb_admin.NoLbConfigs"));
            return null;
        }
View Full Code Here

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

            String httpsRouting, String reloadInterval, String monitor,
            String routeCookie, String target, Properties props)
            throws MBeanException
    {
        LbConfigs lbConfigs = null;
        LbConfig newConfig = null;
        try {
            lbConfigs = getLbConfigs();

            newConfig = new LbConfig();
            if (configName == null) {

                if (target == null) {
                    target =
                        SystemPropertyConstants.DEFAULT_SERVER_INSTANCE_NAME;
                }

                // lb config name is derived by adding a suffix to the target
                configName = target + "-http-lb-config";
            }
            newConfig.setName(configName);
            newConfig.setResponseTimeoutInSeconds(
                new Integer(responseTimeout).toString());
            newConfig.setReloadPollIntervalInSeconds(
                new Integer(reloadInterval).toString());
            newConfig.setMonitoringEnabled(
                Boolean.valueOf(monitor).booleanValue());
            newConfig.setRouteCookieEnabled(
                Boolean.valueOf(routeCookie).booleanValue());
            newConfig.setHttpsRouting(
                Boolean.valueOf(httpsRouting).booleanValue());

            ElementProperty [] eProps = getElementProperty(props);
            if (eProps != null) {
                newConfig.setElementProperty(eProps);
            }

            // XXX do I need to use setConfig instead?
            lbConfigs.addLbConfig(newConfig);
       } catch(ConfigException ce) {
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.