Package com.sun.appserv.management.config

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


  }
 
    public void
  testCreateRemove()
  {
      final DomainConfig  domainConfig    = getDomainConfig();
      final NodeAgentConfig   nodeAgentConfig = getDASNodeAgentConfig();
     
      if ( nodeAgentConfig == null )
      {
          warning( "SKIPPING ClusteredServerConfigTest.testCreateRemove: " +
              "no DAS Node Agent has been specified; use " +
                  PropertyKeys.DAS_NODE_AGENT_NAME );
      }
      else
      {
          final int NUM   = 5;
          final String    baseName    = "ClusteredServerConfigTest";
         
          verifyRefContainers();
         
          final ClusteredServerConfig[]   servers = new ClusteredServerConfig[ NUM ];
          for( int i = 0; i < NUM; ++i )
          {
              final int   basePort    = 11000 + i * 10;
              servers[ i ]    = createClusteredServer( baseName + "-" + i,
                                  nodeAgentConfig.getName(),
                                  basePort );
              printVerbose( "Created ClusteredServerConfig: " + servers[ i ].getName() );
              assert XTypes.CLUSTERED_SERVER_CONFIG.equals( servers[ i ].getJ2EEType() );
             
              verifyRefContainers();
          }
         
          for( int i = 0; i < NUM; ++i )
          {
              final String name   = servers[ i ].getName();
              domainConfig.removeClusteredServerConfig( name );
              printVerbose( "Removed ClusteredServerConfig: " + name );
          }
         
      }
  }
View Full Code Here


  }
 
      private void
  setupConfig()
  {
      final DomainConfig  dc  = getDomainConfig();
      final ConfigConfig  cc  = getConfigConfig();
      final SecurityServiceConfig  ss  = cc.getSecurityServiceConfig();
      final AdminServiceConfig  as  = cc.getAdminServiceConfig();
     
      AuditModuleConfigTest.ensureDefaultInstance( ss );
View Full Code Here

        public static ConfigConfig
  ensureDefaultInstance( final DomainRoot domainRoot )
  {
        ConfigConfig   config   = null;
       
        final DomainConfig  domainConfig    = domainRoot.getDomainConfig();
        final Map<String,ConfigConfig>  existing  = domainConfig.getConfigConfigMap();
       
        if ( supportsMultipleServers( domainRoot ) )
        {
            config = existing.get( getDefaultInstanceName( domainRoot ) );
            if ( config == null )
View Full Code Here

    public synchronized void
  xtestDomainConfig()
    throws IllegalAccessException, InvocationTargetException
  {
    final DomainRoot  domainRoot    = getDomainRoot();
    final DomainConfig  domainConfig   = domainRoot.getDomainConfig();
   
    printPerf( "-- DomainConfig --- " );
   
    final int  ITER  = 20;
   
View Full Code Here

  }
 
    public void
  testGetDeployedItemProxies()
  {
    final DomainConfig  mgr  = getDomainConfig();
   
    final Set  proxies  = mgr.getContaineeSet();
    assert( proxies.size() != 0 );
   
    final Iterator  iter  = proxies.iterator();
    while ( iter.hasNext() )
    {
View Full Code Here

  }
 
    public void
  testGetDeployedItemProxiesByName()
  {
    final DomainConfig  mgr  = getDomainConfig();
   
    final Map<String,Map<String,AMX>>  typeMap  = mgr.getMultiContaineeMap( null );
   
    for( final String j2eeType : typeMap.keySet() )
    {
      final Map<String,AMX>  proxyMap  = typeMap.get( j2eeType );
      for( final String name : proxyMap.keySet() )
      {
        final AMX    amx  = Util.asAMX(proxyMap.get( name ));
       
        final AMX  proxy  = mgr.getContainee( j2eeType, name);
       
        assert( Util.getObjectName( proxy ).equals( Util.getObjectName( amx ) ) );
        assert( proxy.getName().equals( name ) );
      }
    }
View Full Code Here

 
 
    public void
  testGetAttributes()
  {
    final DomainConfig  mgr  = getDomainConfig();
   
    mgr.getApplicationRoot();
    mgr.getLocale();
    mgr.getLogRoot();
  }
View Full Code Here

 
 
    public void
  testGetMaps()
  {
    final DomainConfig  m  = getDomainConfig();
   
    checkMap( m.getServerConfigMap() );
    checkMap( m.getStandaloneServerConfigMap() );
    checkMap( m.getClusteredServerConfigMap() );
    checkMap( m.getLBConfigMap() );
    checkMap( m.getLoadBalancerConfigMap() );
    checkMap( m.getNodeAgentConfigMap() );
    checkMap( m.getConfigConfigMap() );
    checkMap( m.getClusterConfigMap() );
       
    checkMap( m.getPersistenceManagerFactoryResourceConfigMap() );
    checkMap( m.getJDBCResourceConfigMap() );
    checkMap( m.getJDBCConnectionPoolConfigMap() );
    checkMap( m.getConnectorResourceConfigMap() );
    checkMap( m.getConnectorConnectionPoolConfigMap() );
    checkMap( m.getAdminObjectResourceConfigMap() );
    checkMap( m.getResourceAdapterConfigMap() );
    checkMap( m.getMailResourceConfigMap() );
   
    checkMap( m.getJ2EEApplicationConfigMap() );
    checkMap( m.getEJBModuleConfigMap( ) );
    checkMap( m.getWebModuleConfigMap( ) );
    checkMap( m.getRARModuleConfigMap() );
    checkMap( m.getAppClientModuleConfigMap() );
    checkMap( m.getLifecycleModuleConfigMap() )
  }
View Full Code Here

  }
 
    public synchronized void
  testCreateRemove()
  {
      final DomainConfig  domainConfig    = getDomainConfig();
     
  }
View Full Code Here

    void addToConfig(String webServiceName, Map<String, String> published){//String[] registryLocations) {
        if(webServiceInfoMap == null){
            _logger.fine("ConfigHelper.addToConfig : Incorrect webServiceName ");
            return;
        }
        final DomainConfig dc = this.getDomainConfig();
        String appId = (String)webServiceInfoMap.get(
                WebServiceEndpointInfo.APP_ID_KEY);
       
        Boolean isStandAlone = (Boolean)webServiceInfoMap.get(
                WebServiceEndpointInfo.IS_STAND_ALONE_MODULE_KEY);
       
        String appName = appId;
        String pureWebServiceName = dropAppNameFromWebServiceName(webServiceName);
        String underScoredWebServiceName =
                convertHashesToUnderScores(webServiceName);
       
        WebServiceEndpointConfig wsec = null;
       
        if(!isStandAlone) {
            Map <String, J2EEApplicationConfig> map =
                    dc.getJ2EEApplicationConfigMap();
            J2EEApplicationConfig appConfig = map.get(appName);
            if (appConfig == null) {
                // this will never happen as this created by deployment
                _logger.log(Level.FINE, "Could not find an application with " +
                        " name = "+appName);
            } else  {
                Map <String, WebServiceEndpointConfig> wsmap =
                        appConfig.getWebServiceEndpointConfigMap();
                wsec = wsmap.get(pureWebServiceName);
                if (wsec == null){
                    wsec = appConfig.createWebServiceEndpointConfig(
                            pureWebServiceName, null);
                    wsec.setJBIEnabled(false);
                }
                for (String jndiname  : published.keySet()){
                    appConfig.createProperty(jndiname+"__"+
                            underScoredWebServiceName,
                            published.get(jndiname));
                }
            }
        } else {
            String type = (String)webServiceInfoMap.
                    get(WebServiceEndpointInfo.SERVICE_IMPL_TYPE_KEY);
            if(type.equals(WebServiceEndpointInfo.EJB_IMPL)){
                Map <String, EJBModuleConfig> map
                        = dc.getEJBModuleConfigMap();
                EJBModuleConfig ejbConfig = map.get(appName);
                if (ejbConfig == null) {
                    // should never happen
                    _logger.log(Level.FINE, "Could not find a ejb module" +
                            " with  name = "+appName);
                } else{
                    Map <String, WebServiceEndpointConfig> ejbmap =
                            ejbConfig.getWebServiceEndpointConfigMap();
                    wsec = ejbmap.get(pureWebServiceName);
                    if (wsec == null){
                        wsec = ejbConfig.createWebServiceEndpointConfig(
                                pureWebServiceName, null);
                        wsec.setJBIEnabled(false);
                    }
                    for (String jndiname  : published.keySet()){
                        ejbConfig.createProperty(jndiname+"__"+
                                underScoredWebServiceName,
                                published.get(jndiname));
                    }
                }
            } else if(type.equals(WebServiceEndpointInfo.SERVLET_IMPL)){
                Map <String, WebModuleConfig> map =
                        dc.getWebModuleConfigMap();
                WebModuleConfig webConfig = map.get(appName);
                if (webConfig == null){
                    // should never happen
                    _logger.log(Level.FINE, "Could not find a web module" +
                            " with  name = "+appName);
View Full Code Here

TOP

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

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.