Examples of ClusterConfig


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

    })

    public static void getClusterProperties(HandlerContext handlerCtx) {
        String clusterName = (String) handlerCtx.getInputValue("ClusterName");
        try {
            ClusterConfig cluster = AMXUtil.getDomainConfig().getClusterConfigMap().get(clusterName);
            Map<String, String> props = cluster.getProperties();
            List data = new ArrayList();
            if (props != null) {
                for (String key : props.keySet()) {
                    HashMap oneRow = new HashMap();
                    Object value = props.get(key);
View Full Code Here

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

            @HandlerInput(name = "AddProps", type = Map.class)
    })
    public static void saveClusterProperties(HandlerContext handlerCtx) {
        String clusterName = (String) handlerCtx.getInputValue("ClusterName");
        try {
            ClusterConfig cluster = AMXUtil.getDomainConfig().getClusterConfigMap().get(clusterName);
            Map<String, String> addProps = (Map) handlerCtx.getInputValue("AddProps");
            AMXUtil.updateProperties(cluster, addProps, null);
        } catch (Exception ex) {
            GuiUtil.handleException(handlerCtx, ex);
        }
View Full Code Here

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

    })

    public static void getClusterConfigProperties(HandlerContext handlerCtx) {
        String clusterName = (String) handlerCtx.getInputValue("ClusterName");
        try {
            ClusterConfig cluster = AMXUtil.getDomainConfig().getClusterConfigMap().get(clusterName);
            Map<String, String> props = cluster.getSystemProperties();
            List data = new ArrayList();
            if (props != null) {
                for (String key : props.keySet()) {
                    HashMap oneRow = new HashMap();
                    Object value = props.get(key);
View Full Code Here

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

        @HandlerInput(name = "AddProps", type = Map.class)
        })
    public static void saveClusterConfigProperties(HandlerContext handlerCtx) {
        String clusterName = (String) handlerCtx.getInputValue("ClusterName");
        Map<String, String> addProps = (Map) handlerCtx.getInputValue("AddProps");
        ClusterConfig cluster = AMXUtil.getDomainConfig().getClusterConfigMap().get(clusterName);
        AMXUtil.updateSystemProperties(cluster, addProps);
    }
View Full Code Here

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

    }
   
    public static ClusterConfig
  ensureDefaultInstance( final DomainConfig domainConfig )
  {
      ClusterConfig   result  =
          domainConfig.getClusterConfigMap().get( getDefaultInstanceName() );
     
      if ( result == null )
      {
          result  = domainConfig.createClusterConfig(
View Full Code Here

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

      else if ( domainConfig.getStandaloneServerConfigMap().get( serverName ) != null )
      {
          domainConfig.removeStandaloneServerConfig( serverName );
      }
     
      final ClusterConfig clusterConfig   =
          ClusterConfigTest.ensureDefaultInstance( domainConfig );
     
      if ( domainConfig.getClusteredServerConfigMap().get( serverName ) != null )
      {
          domainConfig.removeClusteredServerConfig( serverName );
          assert domainConfig.getClusteredServerConfigMap().get( serverName ) == null;
      }
     
      final ConfigSetup   setup   = new ConfigSetup( getDomainRoot() );
      final Map<String,String>    options = new HashMap<String,String>();
      setup.setupServerPorts( options, basePort );
     
      final ClusteredServerConfig csc  =
          domainConfig.createClusteredServerConfig( serverName,
                      clusterConfig.getName(),
                      nodeAgentName,
                      options );
      sanityCheck( csc );
     
      return csc;
View Full Code Here

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

    final String serverName,
    final String clusterName,
    final String nodeAgentName,
    final Map<String,String> optional)
  {
      final ClusterConfig clusterConfig   =
          getDomainConfig().getClusterConfigMap().get( clusterName );
      if ( clusterConfig == null )
      {
          throw new IllegalArgumentException( "" + clusterName );
      }
     
      final String configName = clusterConfig.getReferencedConfigName();
     
      debug( "creating server:\n" + (optional == null ? "null" : MapUtil.toString( optional )) );
      final ObjectName    serverObjectName =
          super.create( serverName, nodeAgentName, configName, optional );
     
      // now create a reference.
      debug( "created server: " + serverName + " in cluster " + clusterName +
          "with node agent " + nodeAgentName );
      final Map<String,String>    options = new HashMap<String,String>();
      options.put( ServerRefConfigCR.ENABLED_KEY, "true" );
      options.put( ServerRefConfigCR.LB_ENABLED_KEY, "" + getLBEnabled(clusterConfig) );
      debug( "creating reference" );
      final ServerRefConfig   refConfig =
          clusterConfig.createServerRefConfig( serverName, options );
      debug( "created reference" );
     
      // Now wait until internal code mutates the STANDALONE_SERVER_CONFIG into
      // a CLUSTERED_SERVER_CONFIG
      final String props  = Util.makeRequiredProps( XTypes.CLUSTERED_SERVER_CONFIG, serverName );
View Full Code Here

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

        private ClusterConfig
    findClusterForClusteredServer( final String clusteredServerName )
    {
      // find the cluster referencing this server
      ClusterConfig clusterConfig = null;
     
      final Map<String,ClusterConfig> clusters    = getDomainConfig().getClusterConfigMap();
      for( final ClusterConfig cc : clusters.values() )
      {
          final Map<String,ServerRefConfig>   servers = cc.getServerRefConfigMap();
View Full Code Here

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

   
    protected void
  removeByName(final String clusteredServerName)
  {
        // find the cluster referencing this server
        final ClusterConfig clusterConfig =
            findClusterForClusteredServer( clusteredServerName );
        if ( clusterConfig == null )
        {
            throw new IllegalArgumentException( "" + clusteredServerName );
        }
View Full Code Here

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

                                aTarget.getName());
            cfg = (DeployedItemRefConfig)svrProxy.getContainee(
                    XTypes.DEPLOYED_ITEM_REF_CONFIG, moduleID);
            resolver = svrProxy;
        } else {
            ClusterConfig clProxy = (ClusterConfig)getDomainConfigProxy().
                    getContainee(XTypes.CLUSTER_CONFIG, aTarget.getName());
            cfg = (DeployedItemRefConfig)clProxy.getContainee(
                    XTypes.DEPLOYED_ITEM_REF_CONFIG, moduleID);
            /*
             *We cannot assign the resolver yet because the cluster config proxy itself cannot resolve templates.
             */
            resolver = null;
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.