Examples of LBConfigHelper


Examples of com.sun.appserv.management.helper.LBConfigHelper

            return null;
        return AMXUtil.getDomainRoot().getMonitoringRoot().getServerRootMonitorMap().get(instanceName);
    }
   
    public static LBConfigHelper getLBConfigHelper(){
        return ( lbConfigHelper == null)new LBConfigHelper(getDomainRoot()) : lbConfigHelper;
    }
View Full Code Here

Examples of com.sun.appserv.management.helper.LBConfigHelper

        try
        {
            MBeanServerConnection mbsc = getMBeanServerConnection(getHost(), getPort(),
                                                    getUser(), getPassword());
            DomainRoot domainRoot = ProxyFactory.getInstance(mbsc).getDomainRoot();
            LBConfigHelper lbconfigHelper = new LBConfigHelper(domainRoot);
            lbconfigHelper.configureLBWeight(clusterName, instanceWeights);
            CLILogger.getInstance().printDetailMessage(getLocalizedString(
                                                       "CommandSuccessful",
                                                       new Object[] {name}));
        } catch (Exception e)
        {           
View Full Code Here

Examples of com.sun.appserv.management.helper.LBConfigHelper

        {
            MBeanServerConnection mbsc = getMBeanServerConnection(getHost(), getPort(),
                                                                  getUser(), getPassword());
            DomainRoot domainRoot = ProxyFactory.getInstance(mbsc).getDomainRoot();

            LBConfigHelper lbconfigHelper = new LBConfigHelper(domainRoot);
            lbconfigHelper.createLoadBalancer(lbName, target, getLBParams(),
                                                getLBProperties());
            //Now configure the weights for the target cluster
            final boolean isCluster =
                domainRoot.getDomainConfig().getClusterConfigMap().keySet().contains(target);
            if ( ! isCluster )
            {
                //display warning and continue
                _strMgr.getString("WeightCannotApplyToNonCluster",
                                        new Object[] {target});
            }
            else if (getOption(LBConfigHelper.LB_WEIGHT) != null)
                lbconfigHelper.configureLBWeight(target, instanceWeights);
            //Test the connection if autoapplyenabled is true and
            // display warning if pinging is unsuccesful
            if (autoApplyEnabled)
            {
                if (!domainRoot.getLoadBalancerMap().get(lbName).testConnection())
View Full Code Here

Examples of com.sun.appserv.management.helper.LBConfigHelper

        try
        {
            MBeanServerConnection mbsc = getMBeanServerConnection(getHost(), getPort(),
                                                                  getUser(), getPassword());
            DomainRoot domainRoot = ProxyFactory.getInstance(mbsc).getDomainRoot();
            LBConfigHelper lbconfigHelper = new LBConfigHelper(domainRoot);
            lbconfigHelper.removeLBRef(lbName, configName, target, force);
            CLILogger.getInstance().printDetailMessage(getLocalizedString(
                   "CommandSuccessful",
                   new Object[] {name}));
        }
        catch(Exception e)
View Full Code Here

Examples of com.sun.appserv.management.helper.LBConfigHelper

        try
        {
            MBeanServerConnection mbsc = getMBeanServerConnection(getHost(), getPort(),
                                                    getUser(), getPassword());
            DomainRoot domainRoot = ProxyFactory.getInstance(mbsc).getDomainRoot();
            LBConfigHelper lbconfigHelper = new LBConfigHelper(domainRoot);
            lbconfigHelper.createLBRef(lbName, configName, target, mOptions);
            //Now configure the weights for the target cluster
            final boolean isCluster =
                domainRoot.getDomainConfig().getClusterConfigMap().keySet().contains(target);
            if ( ! isCluster )
            {
                //display warning and continue
                CLILogger.getInstance().printWarning(
                        _strMgr.getString("WeightCannotApplyToNonCluster",
                                        new Object[] {target}));
            }
            else if (getOption(LBConfigHelper.LB_WEIGHT) != null)
                lbconfigHelper.configureLBWeight(target, getInstanceWeightsMap());
            CLILogger.getInstance().printDetailMessage(getLocalizedString(
                                                       "CommandSuccessful",
                                                       new Object[] {name}));
        }
        catch (Exception e)
View Full Code Here

Examples of com.sun.appserv.management.helper.LBConfigHelper

                                                                  getUser(), getPassword());
            String lbName = (String) getOperands().get(0);

            DomainRoot domainRoot = ProxyFactory.getInstance(mbsc).getDomainRoot();

            LBConfigHelper lbconfigHelper = new LBConfigHelper(domainRoot);
            lbconfigHelper.removeLoadbalancer(lbName);
            CLILogger.getInstance().printDetailMessage(getLocalizedString(
                   "CommandSuccessful",
                   new Object[] {name}));
        }
        catch(Exception e)
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.