Examples of DomainConfig


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

      public static Set<DeployedItemRefConfigCR>
  getTargetProxies(
      final DomainRoot    domainRoot,
      final String[]      names )
  {
      final DomainConfig  domainConfig = domainRoot.getDomainConfig();
     
      final Set<DeployedItemRefConfigCR>  result  = new HashSet<DeployedItemRefConfigCR>();
     
      final Map<String,StandaloneServerConfig> serverConfigs =
          domainConfig.getStandaloneServerConfigMap();
         
      final Map<String,ClusterConfig> clusterConfigs =
          domainConfig.getClusterConfigMap();
         
      for( final String name : names )
      {
          if ( serverConfigs.containsKey( name ) )
          {
View Full Code Here

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

          if ( ref.getContainer() instanceof ClusterConfig )
          {
              final String serverName = ref.getRef();
                debug( "mbeanRegistered: serverName = " + serverName );
             
              final DomainConfig domainConfig = getDomainRoot().getDomainConfig();
                 
              if ( domainConfig.getClusteredServerConfigMap().get( serverName ) == null )
              {
                  final ServerConfig  server  =
                      domainConfig.getServerConfigMap().get( serverName );

                  // it's referenced by a cluster, but not a ClusteredServerConfig. Fix it.
                  final ObjectName    serverObjectName    = Util.getObjectName( server );
                    debug( "mbeanRegistered: serverConfig = " + serverObjectName );
                  try
View Full Code Here

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

    */
    public Target[] getTargets() throws IllegalStateException {
        verifyConnected();
        Target[] result  = null;
        try {
            DomainConfig domainCfg = getDomainConfigProxy();
            /*
             *There is no single proxy that "owns" both clusters and stand-alone instances, the
             *two types of targets.  So
             *visit the two mgr proxies to retrieve the names of all targets of either type.
             *From there on, the names can be treated the same regardless of which config mgr proxy
             *each came from.
             */
            final Map standaloneServers =
                    domainCfg.getStandaloneServerConfigMap();
            final Map clusters = domainCfg.getClusterConfigMap();
            /*
             *Build a single result containing SunTarget instances for either kind of target.
             */
            Vector targets = new Vector();
           
View Full Code Here

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

        try
        {
            MBeanServerConnection mbsc = getMBeanServerConnection(getHost(), getPort(),
                                                                  getUser(), getPassword());
            DomainRoot domainRoot = ProxyFactory.getInstance(mbsc).getDomainRoot();
            DomainConfig domainConfig = domainRoot.getDomainConfig();
            Map lbMap = domainConfig.getLoadBalancerConfigMap();
            for (Object key : lbMap.keySet())
                CLILogger.getInstance().printMessage((String)key);
            CLILogger.getInstance().printDetailMessage(getLocalizedString(
                   "CommandSuccessful",
                   new Object[] {name}));
View Full Code Here

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

        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",
                                        new Object[] {lbName}));
            }
View Full Code Here

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

        @HandlerOutput(name="AppRoot",     type=String.class),
        @HandlerOutput(name="LogRoot", type=String.class),
        @HandlerOutput(name="Locale", type=String.class)})
        public static void getServerDomainAttributes(HandlerContext handlerCtx) {
       
        DomainConfig domainConfig = AMXUtil.getDomainConfig();
        String appRoot = domainConfig.getApplicationRoot();
        String logRoot = domainConfig.getLogRoot();
        String locale = domainConfig.getLocale();
        handlerCtx.setOutputValue("AppRoot", appRoot);
        handlerCtx.setOutputValue("LogRoot", logRoot);
        handlerCtx.setOutputValue("Locale", locale);
       
    }
View Full Code Here

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

        @HandlerInput(name="AppRoot",     type=String.class),
        @HandlerInput(name="LogRoot", type=String.class),
        @HandlerInput(name="Locale", type=String.class)})
        public static void saveServerDomainAttributes(HandlerContext handlerCtx) {
       
        DomainConfig domainConfig = AMXUtil.getDomainConfig();
       
        domainConfig.setApplicationRoot((String)handlerCtx.getInputValue("AppRoot"));
        domainConfig.setLogRoot((String)handlerCtx.getInputValue("LogRoot"));
        domainConfig.setLocale((String)handlerCtx.getInputValue("Locale"));
       
    }   
View Full Code Here

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

    public TargetModuleID[] listAppRefs(String[] targets) throws IOException {
        if(!isConnected()) {
            throw new IllegalStateException(localStrings.getString("enterprise.deployment.client.disconnected_state"));
        }
        Vector tmpVector = new Vector();
        DomainConfig domainCfg = ProxyFactory.getInstance(dasConnection).getDomainRoot().getDomainConfig();
        Map serverProxies = domainCfg.getStandaloneServerConfigMap();
        Map clusterProxies = domainCfg.getClusterConfigMap();
        Map clusteredServerProxies = domainCfg.getClusteredServerConfigMap();
        for(int i=0; i<targets.length; i++) {
            Set proxySet = null;
            if(serverProxies.get(targets[i]) != null) {
                StandaloneServerConfig tgtProxy =
                    (StandaloneServerConfig)domainCfg.getContainee(
                        XTypes.STANDALONE_SERVER_CONFIG, targets[i]);
                proxySet = tgtProxy.getContaineeSet(XTypes.DEPLOYED_ITEM_REF_CONFIG);
            } else if(clusterProxies.get(targets[i]) != null) {
                ClusterConfig tgtProxy =
                    (ClusterConfig)domainCfg.getContainee(
                        XTypes.CLUSTER_CONFIG, targets[i]);
                proxySet = tgtProxy.getContaineeSet(XTypes.DEPLOYED_ITEM_REF_CONFIG);
            } else if(clusteredServerProxies.get(targets[i]) != null) {
                ClusteredServerConfig tgtProxy =
                    (ClusteredServerConfig)domainCfg.getContainee(
                        XTypes.CLUSTERED_SERVER_CONFIG, targets[i]);
                proxySet = tgtProxy.getContaineeSet(XTypes.DEPLOYED_ITEM_REF_CONFIG);
            } else if(TargetType.DOMAIN.equals(targets[i])) {
                StandaloneServerConfig tgtProxy =
                    (StandaloneServerConfig)domainCfg.getContainee(
                        XTypes.STANDALONE_SERVER_CONFIG, DAS);
                proxySet = tgtProxy.getContaineeSet(XTypes.DEPLOYED_ITEM_REF_CONFIG);
            } else {
                return null;
            }
View Full Code Here

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

                    targetsArray[i] = serv;
                    continue;
                }
                // for PE, it will not come here at all; go ahead and get proxies and server/cluster keysets from the proxies
                if(serverProxies == null || clusterProxies == null) {
                    DomainConfig domainCfg = ProxyFactory.getInstance(dasConnection).getDomainRoot().getDomainConfig();
                    serverProxies = domainCfg.getStandaloneServerConfigMap();
                    clusterProxies = domainCfg.getClusterConfigMap();
                }
                // check if ctarget is a stand alone server
                if(serverProxies.get(targets[i]) != null) {
                    SunTarget aTarget = new SunTarget(serverId);
                    aTarget.setAppServerInstance(targets[i]);
View Full Code Here

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

        }
    }
   
    private boolean isDefaultWebModule(SunTarget domain, ConnectionSource dasConnection, String moduleID) {
        try {
            DomainConfig cfg = ProxyFactory.getInstance(dasConnection).getDomainRoot().getDomainConfig();
            Map cfgcfg = cfg.getConfigConfigMap();
            for(Iterator it1 = cfgcfg.keySet().iterator(); it1.hasNext(); ) {
                ConfigConfig cf1 = (ConfigConfig) cfgcfg.get(it1.next());
                HTTPServiceConfig httpSvc = cf1.getHTTPServiceConfig();
                Map vsMap = httpSvc.getVirtualServerConfigMap();
                for(Iterator it2 = vsMap.keySet().iterator(); it2.hasNext(); ) {
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.