Examples of DomainRoot


Examples of com.sun.appserv.management.DomainRoot

        final String target = getOption(TARGET_OPTION);
        try
        {
            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())
                    CLILogger.getInstance().printWarning(_strMgr.getString(
                                                        "CouldNotPingLB",
                                                        new Object[] {lbName}));
            }
            CLILogger.getInstance().printDetailMessage(getLocalizedString(
View Full Code Here

Examples of com.sun.appserv.management.DomainRoot

        //get the config, if lbname is specified
        if (lbName!=null)
        {
            MBeanServerConnection mbsc = getMBeanServerConnection(getHost(), getPort(),
                                                    getUser(), getPassword());
            DomainRoot domainRoot = ProxyFactory.getInstance(mbsc).getDomainRoot();
            DomainConfig domainConfig = domainRoot.getDomainConfig();
            LoadBalancerConfig loadBalancerConfig =
                    domainConfig.getLoadBalancerConfigMap().get(lbName);
            if (loadBalancerConfig==null){
                throw new CommandException(
                        _strMgr.getString("LoadBalancerConfigNotDefined",
View Full Code Here

Examples of com.sun.appserv.management.DomainRoot

       
        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}));
View Full Code Here

Examples of com.sun.appserv.management.DomainRoot

        checkConfigAndLBNameOptions(configName, lbName);
        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",
View Full Code Here

Examples of com.sun.appserv.management.DomainRoot

        {
            MBeanServerConnection mbsc = getMBeanServerConnection(getHost(), getPort(),
                                                                  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",
View Full Code Here

Examples of org.glassfish.admin.amx.base.DomainRoot

    public ValidationResult validate(final ObjectName[] targets)
    {
        final long startMillis = System.currentTimeMillis();
        final Failures failures = new Failures();

        final DomainRoot dr = mDomainRoot;

        // list them in order
        for (final ObjectName objectName : targets)
        {
            /* if(bypassTesting(objectName)) {
View Full Code Here

Examples of org.glassfish.admin.amx.base.DomainRoot

  initDomainRoot( )
    throws IOException
  {
    final ObjectName  domainRootObjectName  = getDomainRootObjectName( );
   
    final DomainRoot dr  = getProxy(domainRootObjectName, DomainRoot.class);
   
    return( dr );
  }
View Full Code Here

Examples of org.glassfish.admin.amx.base.DomainRoot

    public synchronized ObjectName
    loadAMXMBeans() {
        FeatureAvailability.getInstance().waitForFeature(FeatureAvailability.AMX_CORE_READY_FEATURE, "" + this);
        FeatureAvailability.getInstance().waitForFeature(AMXConfigConstants.AMX_CONFIG_READY_FEATURE, "" + this);

        final DomainRoot domainRootProxy = ProxyFactory.getInstance(mMBeanServer).getDomainRootProxy(false);
        final ObjectName domainRoot = domainRootProxy.objectName();
        final ObjectNameBuilder objectNames = new ObjectNameBuilder(mMBeanServer, domainRoot);
        final String domainName = Util.getNameProp(domainRoot);

        final Metadata metadata = new MetadataImpl();
        metadata.add(Metadata.CORRESPONDING_CONFIG, domainRootProxy.child(Domain.class).objectName());

        String serverName = mHabitat.getComponent(Server.class).getName();

        final J2EEDomainImpl impl = new J2EEDomainImpl(domainRoot, metadata);
        impl.setServerName(serverName);
View Full Code Here

Examples of org.glassfish.admin.amx.base.DomainRoot

                case ADD:
                    if (changedInstance instanceof Server) {
                        Server server = (Server) changedInstance;
                        String serverName = server.getName();

                        DomainRoot domainRootProxy = ProxyFactory.getInstance(mMBeanServer).getDomainRootProxy(false);

                        MetadataImpl meta = new MetadataImpl();
                        meta.setCorrespondingConfig(domainRootProxy.getDomain().as(Domain.class).getServers().getServer().get(serverName).objectName());
                        final DASJ2EEServerImpl impl = new DASJ2EEServerImpl(getJ2EEDomain(), meta);
                        ObjectName serverObjectName = new ObjectNameBuilder(mMBeanServer, getJ2EEDomain()).buildChildObjectName(J2EETypes.J2EE_SERVER, serverName);
                        try {
                            mMBeanServer.registerMBean(impl, serverObjectName).getObjectName();
                        }
View Full Code Here

Examples of org.glassfish.admin.amx.base.DomainRoot

    public synchronized ObjectName
    loadAMXMBeans() {
        FeatureAvailability.getInstance().waitForFeature(FeatureAvailability.AMX_CORE_READY_FEATURE, "" + this);
        FeatureAvailability.getInstance().waitForFeature(AMXConfigConstants.AMX_CONFIG_READY_FEATURE, "" + this);

        final DomainRoot domainRootProxy = ProxyFactory.getInstance(mMBeanServer).getDomainRootProxy(false);
        final ObjectName domainRoot = domainRootProxy.objectName();
        final ObjectNameBuilder objectNames = new ObjectNameBuilder(mMBeanServer, domainRoot);

        final Metadata metadata = new MetadataImpl();
        metadata.add(Metadata.CORRESPONDING_CONFIG, ConfigBeanRegistry.getInstance().getObjectNameForProxy(domain));
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.