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

JNDIResourceConfigTest

public final class JNDIResourceConfigTest extends ResourceConfigTestBase

Fields Summary
private static final String
JNDI_RESOURCE_JNDI_LOOKUP_NAME
private static final String
JNDI_RESOURCE_RES_TYPE
private static final String
JNDI_RESOURCE_FACTORY_CLASS
private static final Map
OPTIONAL
Constructors Summary
public JNDIResourceConfigTest()


		
	 
	
	    if ( checkNotOffline( "ensureDefaultInstance" ) )
	    {
	        ensureDefaultInstance( getDomainConfig() );
	    }
	
Methods Summary
public static com.sun.appserv.management.config.JNDIResourceConfigcreateInstance(com.sun.appserv.management.config.DomainConfig dc, java.lang.String name, java.lang.String jndiLookupName, java.lang.String resType, java.lang.String factoryClass, java.util.Map optional)

	    return dc.createJNDIResourceConfig(
	            name, jndiLookupName, resType, factoryClass , optional );
	
protected final com.sun.appserv.management.config.AMXConfigcreateProgeny(java.lang.String name, java.util.Map options)

		final JNDIResourceConfig	config	= getDomainConfig().createJNDIResourceConfig( name,
				JNDI_RESOURCE_JNDI_LOOKUP_NAME, 
				JNDI_RESOURCE_RES_TYPE,
				JNDI_RESOURCE_FACTORY_CLASS,
				options );
		
		addReference( config );
		
		return( config );
	
public static com.sun.appserv.management.config.JNDIResourceConfigensureDefaultInstance(com.sun.appserv.management.config.DomainConfig dc)

	    JNDIResourceConfig   result  =
	        dc.getJNDIResourceConfigMap().get( getDefaultInstanceName() );
	    
	    if ( result == null )
	    {
	        result  = createInstance( dc,
	            getDefaultInstanceName(),
	            JNDI_RESOURCE_JNDI_LOOKUP_NAME,
                JNDI_RESOURCE_RES_TYPE,
                JNDI_RESOURCE_FACTORY_CLASS,
	            OPTIONAL );
	    }
	    
	    return result;
	
public static java.lang.StringgetDefaultInstanceName()

        return getDefaultInstanceName( "JNDIResourceConfig" );
    
protected com.sun.appserv.management.base.ContainergetProgenyContainer()

		return getDomainConfig();
	
protected java.lang.StringgetProgenyJ2EEType()

		return XTypes.JNDI_RESOURCE_CONFIG;
	
protected voidremoveProgeny(java.lang.String name)

	    final JNDIResourceConfig item   =
	        getDomainConfig().getJNDIResourceConfigMap().get( name );
	    
		getDomainConfig().removeJNDIResourceConfig( name );