Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.Cluster$DeleteDecorator


  }
    }

    public static boolean isGMSAvailableAndClusterHeartbeatEnabled()
    {
  Cluster cluster = null;
  boolean result =
      (loadClass("com.sun.enterprise.ee.cms.core.GMSFactory") != null)
      && (cluster = getCluster()) != null
      && isClusterHeartbeatEnabled(cluster);
  return result;
View Full Code Here


    public static Cluster getCluster()
    {
  ConfigContext configCtx = null;
  String instanceName = null;
  Cluster result = null;
  try {
            if(_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE, ".getCluster->:");
      }
      ServerContext serverContext = ApplicationServer.getServerContext();
View Full Code Here

        } catch (ConfigException ex) {}
        if(!isClustered) {
            result = serverName + "_nc";    //non-clustered example: server1_nc           
            return result;
        }
        Cluster cluster = null;
        try {
            cluster = ClusterHelper.getClusterForInstance(configCtx, serverName);
        } catch (ConfigException ex) {}
        if(cluster != null) {
            result = cluster.getName();
        }
        return result;
    }
View Full Code Here

     */
    public String[] getServerNamesInCluster(ConfigContext configContext,
        String clusterName) throws ConfigException
    {
        //first ensure that the cluster exists
        Cluster cluster = ClusterHelper.getClusterByName(configContext, clusterName);
       
        //Now fetch the server instances in the cluster.   
        ServerRef[] serverRefs = cluster.getServerRef();
        String[] serverRefNames = new String[serverRefs.length];
        for (int i = 0; i <  serverRefs.length; i++) {
            serverRefNames[i] = serverRefs[i].getRef();
        }
        return serverRefNames;
View Full Code Here

     */
    public boolean isGMSEnabled() {
        if(getClusterName() == null) {
            return false;
        }
        Cluster cluster = getCluster();
        if(cluster == null) {
            return false;
        }
        return cluster.isHeartbeatEnabled();     
    }
View Full Code Here

            isClustered = ServerHelper.isServerClustered(configCtx, serverName);
        } catch (ConfigException ex) {}
        if(!isClustered) {
            return null;
        }
        Cluster cluster = null;
        try {
            cluster = ClusterHelper.getClusterForInstance(configCtx, serverName);
        } catch (ConfigException ex) {}
        return cluster;       
    }
View Full Code Here

       return currentAliveOrReadyMembers;
  

    public static boolean isServerLbEnabled(String instanceName) {
        ServerConfigLookup scl = new ServerConfigLookup();
  Cluster c = scl.getCluster();
  if (c == null) {
      return false;
  }
  ServerRef sr = c.getServerRefByRef(instanceName);
  if (sr == null) {
      return false;
  }
  return sr.isLbEnabled();
    }
View Full Code Here

        //Validate that there is indeed a resource with the specified name. 
        final String type = getApplicationType(referenceName);
        final Target target = TargetBuilder.INSTANCE.createTarget(
            validTypes, targetName, configContext);           
        if (target.getType() == TargetType.CLUSTER) {
            final Cluster cluster = ClusterHelper.getClusterByName(configContext, target.getName());
            addApplicationReferenceToCluster(cluster, enabled, virtualServers, referenceName);
            final Server[] servers = ServerHelper.getServersInCluster(configContext, target.getName());
            addApplicationReferenceToClusteredServers(cluster, servers, enabled,
                virtualServers, referenceName);           
        } else if (target.getType() == TargetType.SERVER ||
View Full Code Here

        if (target.getType() == TargetType.SERVER ||
            target.getType() == TargetType.DAS) {
            final Server server = ServerHelper.getServerByName(configContext, targetName);
            deleteApplicationReferenceFromServer(server, referenceName);
        } else if (target.getType() == TargetType.CLUSTER) {
            final Cluster cluster = ClusterHelper.getClusterByName(configContext, targetName);
            deleteApplicationReferenceFromCluster(cluster, referenceName);
            final Server[] servers = ServerHelper.getServersInCluster(configContext, targetName);
            deleteApplicationReferenceFromClusteredServers(cluster, servers, referenceName);           
        } else {
            throw new ConfigException(_strMgr.getString("invalidClusterOrServerTarget",
View Full Code Here

            targetTypes, targetName, configContext);

        if (target.getType() == TargetType.CLUSTER ||
            target.getType() == TargetType.STANDALONE_CLUSTER)
        {
            Cluster cluster = ClusterHelper.getClusterByName(
                configContext, target.getName());
            if (cluster != null) {
                appRef = cluster.getApplicationRefByRef(appName);
            }
        }
        else
        {
            Server server =  ServerHelper.getServerByName(
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.Cluster$DeleteDecorator

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.