FileDocCategorySizeDatePackage
DomainConfigTest.javaAPI DocGlassfish v2 API5373Fri May 04 22:23:54 BST 2007com.sun.enterprise.management.config

DomainConfigTest

public final class DomainConfigTest extends com.sun.enterprise.management.AMXTestBase

Fields Summary
Constructors Summary
public DomainConfigTest()

	
Methods Summary
private voidcheckMap(java.util.Map m)

		assert( m != null );
		assert( ! m.keySet().contains( AMX.NO_NAME ) );
		assert( ! m.keySet().contains( AMX.NULL_NAME ) );
	
public voidtestCreateClusterConfig()

	    // to be done
	
public voidtestGetAttributes()

		final DomainConfig	mgr	= getDomainConfig();
		
		mgr.getApplicationRoot();
		mgr.getLocale();
		mgr.getLogRoot();
	
public voidtestGetDeployedItemProxies()

		final DomainConfig	mgr	= getDomainConfig();
		
		final Set	proxies	= mgr.getContaineeSet();
		assert( proxies.size() != 0 );
		
		final Iterator	iter	= proxies.iterator();
		while ( iter.hasNext() )
		{
			final AMX	proxy	= Util.asAMX(iter.next());
		}
	
public voidtestGetDeployedItemProxiesByName()

		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 ) );
			}
		}
	
public voidtestGetMaps()

		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() );