FileDocCategorySizeDatePackage
AdminObjectResourceConfigFactory.javaAPI DocGlassfish v2 API4582Fri May 04 22:23:16 BST 2007com.sun.enterprise.management.config

AdminObjectResourceConfigFactory

public final class AdminObjectResourceConfigFactory extends ResourceFactoryImplBase

Fields Summary
Constructors Summary
public AdminObjectResourceConfigFactory(ConfigFactoryCallback callbacks)

		super( callbacks );
	
Methods Summary
public javax.management.ObjectNamecreate(java.lang.String jndiName, java.lang.String resType, java.lang.String resAdapter, java.util.Map reserved)
Creates a new <admin-object-resource>

param
jndiName
param
resType
param
resAdapter
param
reserved

        final String[] requiredParams = new String[]
		{
			RESOURCE_TYPE_KEY,		resType,
			RESOURCE_ADAPTER_KEY,	resAdapter,
		};
		
		final Map<String,String>			params	= initParams( jndiName, requiredParams, reserved );
		
		final ObjectName	amxName	= createNamedChild( jndiName, params );
		
		return( amxName );
	
protected javax.management.ObjectNamecreateOldChildConfig(javax.management.AttributeList translatedAttrs)
The caller is responsible for dealing with any Properties.

		return( getOldResourcesMBean().createAdminObjectResource( translatedAttrs ) );
	
protected java.util.MapgetParamNameOverrides()

		return( MapUtil.newMap( CONFIG_NAME_KEY, "jndi_name" ) );
	
protected voidremoveByName(java.lang.String name)

	    final Set<ResourceRefConfig> refs   =
	        findAllRefConfigs( XTypes.ADMIN_OBJECT_RESOURCE_CONFIG, name );
	    
	    if ( refs.size() == 0 )
	    {
		    getOldResourcesMBean().removeAdminObjectResourceByJndiName( name );
	    }
	    else
	    {
    	    for( final ResourceRefConfig ref : refs )
    	    {
    	        final String target = ref.getContainer().getName();
		        getOldResourcesMBean().deleteAdminObjectResource( name, target );
    	    }
		}