FileDocCategorySizeDatePackage
ResourceConfigTestBase.javaAPI DocGlassfish v2 API3308Fri May 04 22:23:56 BST 2007com.sun.enterprise.management.config

ResourceConfigTestBase

public abstract class ResourceConfigTestBase extends ConfigMgrTestBase

Fields Summary
Constructors Summary
protected ResourceConfigTestBase()

		super();
		
		StandaloneServerConfigTest.ensureDefaultInstance( getDomainRoot() );
	
Methods Summary
protected voidaddReference(com.sun.appserv.management.config.ResourceConfig rc)

	    final StandaloneServerConfig    server  =
	        StandaloneServerConfigTest.ensureDefaultInstance( getDomainRoot() );
	    assert server != null;
	    
	    if ( server.getResourceRefConfigMap().get( rc.getName() ) != null )
	    {
	        warning( "ResourceRefConfig already exists for: " + rc.getName() );
	    }
	    else
	    {
    	    try
    	    {
    	        server.createResourceRefConfig( rc.getName(), false );
    	    }
    	    catch( Exception e )
    	    {
    	        final Throwable rootCause   = ExceptionUtil.getRootCause( e );
    	        
    	        warning( "Couldn't add RefConfig to: " + Util.getObjectName( rc ) );
    	    }
	    }
	    
	    assert server.getResourceRefConfigMap().get( rc.getName() ) != null;