FileDocCategorySizeDatePackage
ConnectorResourceConfigFactory.javaAPI DocGlassfish v2 API4398Fri May 04 22:23:18 BST 2007com.sun.enterprise.management.config

ConnectorResourceConfigFactory

public final class ConnectorResourceConfigFactory extends ResourceFactoryImplBase

Fields Summary
public static final String
RESOURCE_POOL_NAME_KEY
Constructors Summary
public ConnectorResourceConfigFactory(ConfigFactoryCallback callbacks)

		super( callbacks );
	
Methods Summary
public javax.management.ObjectNamecreate(java.lang.String jndiName, java.lang.String poolName, java.util.Map optional)
Creates a new <connector-resource>

param
jndiName
param
poolName
param
optional

	
	                                               
		 
	  	
             	
             	 
	
        final String[] requiredParams = new String[]
		{
			RESOURCE_POOL_NAME_KEY,		poolName,
		};
		
		final Map<String,String> params	= initParams( jndiName, requiredParams, optional );
		
		final ObjectName	amxName	= createNamedChild( jndiName, params );
		
		return( amxName );
	
protected javax.management.ObjectNamecreateOldChildConfig(javax.management.AttributeList translatedAttrs, java.util.Properties props)

		return( getOldResourcesMBean().createConnectorResource( translatedAttrs, props, null ) );
	
protected java.util.MapgetParamNameOverrides()

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

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