Package com.sun.appserv.management.config

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


  {
        final ConfigSetup setup  = new ConfigSetup( getDomainRoot() );
       
        setup.removeConfig( name );
       
        final ConfigConfig  config  = setup.createConfig( name );
        assert( name.equals( config.getName() ) );
       
        // see that it responds to a request
        final Map<String,Object>    attrs   = Util.getExtra( config ).getAllAttributes();
        //printVerbose( "Attributes for config " + config.getName() + ":" );
        //printVerbose( MapUtil.toString( attrs, NEWLINE ) );
View Full Code Here


    }
   
        public  void
    testCreateRemove()
    {
        final ConfigConfig  config = getConfigConfig();
       
        // set defaults
        boolean   computeChecksum   = true;
        boolean   captureInstallLog = true;
        boolean   captureSystemInfo = true;
        boolean   captureHADBInfo   = true;
        boolean   captureAppDD      = true;
        boolean   verifyConfig      = true;
        String    minLogLevel       = Level.INFO.toString();
        String    maxLongEntries    = "10000";
       
        DiagnosticServiceConfig ds  = config.getDiagnosticServiceConfig();
        if ( ds != null )
        {
            // remember current settings
            computeChecksum   = ds.getComputeChecksum();
            captureInstallLog = ds.getCaptureInstallLog();
            captureSystemInfo = ds.getCaptureSystemInfo();
            captureHADBInfo   = ds.getCaptureHADBInfo();
            captureAppDD      = ds.getCaptureAppDD();
            verifyConfig      = ds.getVerifyConfig();
            minLogLevel       = ds.getMinLogLevel();
            maxLongEntries    = ds.getMaxLogEntries();
           
            config.removeDiagnosticServiceConfig();
            ds  = null;
        }
       
        ds  = config.createDiagnosticServiceConfig();
        config.removeDiagnosticServiceConfig(); ds = null;
       
        // re-create it so one stays around
        ds  = config.createDiagnosticServiceConfig();
        ds.setComputeChecksum( computeChecksum );
        ds.setCaptureInstallLog( captureInstallLog);
        ds.setCaptureSystemInfo( captureSystemInfo );
        ds.setCaptureHADBInfo( captureHADBInfo );
        ds.setCaptureAppDD( captureAppDD );
View Full Code Here

  }
 
    protected ModuleMonitoringLevelsConfig
  getModuleMonitoringLevelsConfig( final String configName )
  {
    final ConfigConfig  cc  = configName == null ? getConfigConfig() : getConfigConfig( configName );
    assert( cc != null );
   
    final ModuleMonitoringLevelsConfig  mon  =
      cc.getMonitoringServiceConfig().getModuleMonitoringLevelsConfig();
   
    return( mon );
  }
View Full Code Here

  }
   
        private static SecurityServiceConfig
    getDefaultSecurityServiceConfig( final DomainRoot domainRoot )
    {
        final ConfigConfig  config  = ConfigConfigTest.ensureDefaultInstance( domainRoot );
        final SecurityServiceConfig ss  = config.getSecurityServiceConfig();
        assert( ss != null );
        return ss;
    }
View Full Code Here

               
                // in case a previous failed run left them around
                setup.removeServer( serverName );
                setup.removeConfig( configName );
               
                final ConfigConfig  config  = setup.createConfig( configName );
                assert( configName.equals( config.getName() ) );
               
                // sanity check
                final Map<String,Object>    attrs   = Util.getExtra( config ).getAllAttributes();
               
                try
                {
                    final StandaloneServerConfig  server =
                        setup.createServer( serverName, basePort, nodeAgentName, config.getName() );
                    // it worked, get rid of it
                    setup.removeServer( server.getName() );
                }
                catch( Throwable t)
                {
                    assert false : ExceptionUtil.toString( t );
                }
                finally
                {
                    try
                    {
                        setup.removeConfig( config.getName() );
                    }
                    catch( Exception ee )
                    {
                        // we wanted to get rid of it...oh well.
                    }
View Full Code Here

      public synchronized void
  testCreateRemove()
  {
      if ( checkNotOffline( "testCreateRemove" ) )
      {
          final ConfigConfig  configConfig    = getConfigConfig();
         
          // remove first, in case it's there
          configConfig.removeConnectorServiceConfig();
         
          // create and remove
          configConfig.createConnectorServiceConfig();
          configConfig.removeConnectorServiceConfig();
         
          // leave it there
          ensureDefaultInstance( configConfig );
      }
  }
View Full Code Here

        public ConfigConfig
    createConfig( final String name)
    {
        final Map<String,String>    options = new HashMap<String,String>();
       
        final ConfigConfig  config =
            getDomainConfig().createConfigConfig( name, options );
           
        return config;
    }
View Full Code Here

   
       
    // set any optional params
    if ( amxName != null )
    {
        final ConfigConfig  config  = getCallbacks().getProxyFactory().getProxy( amxName, ConfigConfig.class);
       
        Object value;
       
        value   = optional.get( ConfigConfigKeys.DYNAMIC_RECONFIGURATION_ENABLED_KEY );
        if ( value != null )
        {
            config.setDynamicReconfigurationEnabled( Boolean.parseBoolean( "" + value ) );
        }
    }
   
    return( amxName );
  }
View Full Code Here

                if (sprops.existsSystemProperty(pn)){
                    return sprops.getSystemPropertyValue(pn);
                }
            }
        }
        ConfigConfig config = AMXUtil.getConfig(configName);
        return config.getSystemPropertyValue(pn);
    }
View Full Code Here

     @return  config with the specified name,  or NULL if no such config exists.
     */
    public static ConfigConfig getConfig(String configName){
        if (GuiUtil.isEmpty(configName)) return null;
        Map<String,ConfigConfig> cmap = (Map) getDomainConfig().getConfigConfigMap();
        ConfigConfig config = cmap.get(configName);
        return config;
    }
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.config.ConfigConfig

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.