Examples of ClusterConfig


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

    public void configureLBWeight(String clusterName, Map instanceVsWeights) {
       
        //get ALL clustered <server> elements
        Map<String,ClusterConfig> clusterConfigMap = mDomainConfig.getClusterConfigMap();
        //get the cluster config for the given cluster
        ClusterConfig clusterConfig = clusterConfigMap.get(clusterName);
        if(clusterConfig == null)
            throw new IllegalArgumentException(formatter.format(resBundle.getString("InvalidCluster"),clusterName));
        //get the map of clustered server config
        Map<String,ClusteredServerConfig> clusteredServerConfigMap = clusterConfig.getClusteredServerConfigMap();
        //iterate through all the given weights and instances
        for(Object instance:instanceVsWeights.keySet()){
            //get the corresponding clustered server config for this instance
            ClusteredServerConfig clusteredServerConfig = clusteredServerConfigMap.get(instance);
            if(clusteredServerConfig == null)
View Full Code Here

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

     */
    public void enableAllApplications(String target){
        //check if the target is cluster
        if (isCluster(target)) {
            //get the cluster config
            ClusterConfig cRef = mDomainConfig.getClusterConfigMap().get(target);
            enableAllApplications(cRef.getDeployedItemRefConfigMap());
        } else {
            //The target must be server, get the server config for this target
            ServerConfig serverConfig = mDomainConfig.getServerConfigMap().get(target);
            if(serverConfig != null){
                enableAllApplications(serverConfig.getDeployedItemRefConfigMap());
View Full Code Here

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

                mDomainConfig.getClusterConfigMap();
       
        if (cConfigMap == null) {
            return false;
        }
        ClusterConfig cConfig = (ClusterConfig) cConfigMap.get(name);
        if ( cConfig == null) {
            return false;
        } else {
            return true;
        }
View Full Code Here

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

       
        try {
            // disables cluster if target is a cluster
            if (isCluster(target)) {
                //get the cluster config
                ClusterConfig cRef = mDomainConfig.getClusterConfigMap().get(target);
                if (cRef == null) {
                    mLogger.log(Level.FINEST," server " + target +
                            " does not exist in any cluster in the domain");
                    String msg = formatter.format(resBundle.getString("ServerNotDefined"),
                            target);
                    throw new MBeanException(new RuntimeException(msg));
                }

                //iterate through all the servers in the cluster
                for(ServerRefConfig sRef : cRef.getServerRefConfigMap().values()){
                    //set lb-enabled flag and the timeout with error checks
                    setLBEnabled(sRef, status, timeout, target, ignore);
                }
            } else { // target is a server
                ServerRefConfig sRef = null;
View Full Code Here

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

            DeployedItemRefConfig dRef = null;
            // disables cluster if target is a cluster
            if (isCluster(target)) {
                //get the clusterConfig for this cluster
                Map<String,ClusterConfig> clusterConfigs = mDomainConfig.getClusterConfigMap();
                ClusterConfig clusterConfig = clusterConfigs.get(target);
                //get the deployed item object corresponding to the given appName
                dRef = clusterConfig.getDeployedItemRefConfigMap().get(appName);
            } else { // target is a server
                //get the standalone serverConfig
                Map<String,StandaloneServerConfig> ssConfigMap =
                        mDomainConfig.getStandaloneServerConfigMap();
                StandaloneServerConfig ssc = ssConfigMap.get(target);
View Full Code Here

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

                //get the cluster name
                String clusterName = clusterRef.getReferencedClusterName();
               
                //get the clusterConfig for this clustername
                Map<String,ClusterConfig> clusterConfigs =  mDomainConfig.getClusterConfigMap();
                ClusterConfig config = clusterConfigs.get(clusterName);
               
                //get all the server-refs for this cluster
                Map<String,ServerRefConfig> serverRefConfigs = config.getServerRefConfigMap();
               
                //iterate through the server-refs
                for(ServerRefConfig serverRefConfig : serverRefConfigs.values() ){
                   
                    //if this server-ref matches the given target , return it
View Full Code Here

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

                for (String clusterRef : lbClusterRefConfigMap.keySet())
                    relevantClusterConfigMap.put(clusterRef,
                        clusterConfigMap.get(clusterRef));
                //so now we have the right set of <cluster> elements
                for (String clusterName : relevantClusterConfigMap.keySet()) {
                    ClusterConfig clusterConfig =
                        relevantClusterConfigMap.get(clusterName);
                    Map<String,ServerRefConfig> clusteredServerRefConfigMap =
                        clusterConfig.getServerRefConfigMap();
                    for (String serverRef : clusteredServerRefConfigMap.keySet()) {
                        if (serverRef.equals(targetName)) {
                            result.put(lbConfigName, lbConfig);
                            break;
                        }
View Full Code Here

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

        //try to see if its a server, if not, try cluster.
        ServerConfig serverConfig = getDomainConfig().getServerConfigMap().get(name);
        if (serverConfig != null){
            return serverConfig.getReferencedConfigName();
        }
        ClusterConfig clusterConfig = getDomainConfig().getClusterConfigMap().get(name);
        if (clusterConfig != null)
            return clusterConfig.getReferencedConfigName();
        return null;
    }
View Full Code Here

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

   */
  static public ResourceRefConfig getResourceRef(String name, String target){
      StandaloneServerConfig server = AMXUtil.getDomainConfig().getStandaloneServerConfigMap().get(target);
      ResourceRefConfig ref = null;
            if (server == null){
    ClusterConfig cluster = AMXUtil.getDomainConfig().getClusterConfigMap().get(target);
    ref = (cluster == null) ? null :  cluster.getResourceRefConfigMap().get(name);
      }else{
    ref = server.getResourceRefConfigMap().get(name);
      }
            return ref;
  }
View Full Code Here

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

   */
  static public List<Map<String, ResourceRefConfig>> getAllResourceRefConfig(String target){
            List<Map<String, ResourceRefConfig>> allResourceRefs = new ArrayList();
           
            if (isCluster(target)){
                ClusterConfig cluster = AMXUtil.getDomainConfig().getClusterConfigMap().get(target);
                allResourceRefs.add(cluster.getResourceRefConfigMap());
                //For every server in this cluster, we have to change the source ref status also.
                Map<String,ClusteredServerConfig> clusteredServerConfigMap = cluster.getClusteredServerConfigMap();
                Collection <ClusteredServerConfig> csConfigs = clusteredServerConfigMap.values();
                for(ClusteredServerConfig csConfig : csConfigs){
                    allResourceRefs.add(csConfig.getResourceRefConfigMap());
                }
            }else{
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.