FileDocCategorySizeDatePackage
JNDIResourceConfigFactory.javaAPI DocGlassfish v2 API4708Fri May 04 22:23:20 BST 2007com.sun.enterprise.management.config

JNDIResourceConfigFactory

public final class JNDIResourceConfigFactory extends ResourceFactoryImplBase
MBean managing all instances of JNDIResource.

Fields Summary
private static final String
JNDI_LOOKUP_NAME_KEY
private static final String
FACTORY_CLASS_KEY
private static final String
RES_TYPE_KEY
Constructors Summary
public JNDIResourceConfigFactory(ConfigFactoryCallback callbacks)

		super( callbacks );
	
Methods Summary
public javax.management.ObjectNamecreate(java.lang.String jndiName, java.lang.String jndiLookupName, java.lang.String resType, java.lang.String factoryClass, java.util.Map optional)
Creates a new <external-jndi-resource>.

param
jndiName
param
jndiLookupName
param
resType
param
factoryClass
param
optional

		final String[] requiredParams = new String[]
		{
			JNDI_LOOKUP_NAME_KEY,       jndiLookupName,
		    RES_TYPE_KEY,               resType,
		    FACTORY_CLASS_KEY,          factoryClass,
		};
		        
		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)
The caller is responsible for dealing with any Properties.


                
        		        	 
		 
	
		   
	
		
		trace( "JNDIResourceConfigFactory.createOldChildConfig: creating using: " +
			stringify( translatedAttrs ) );
			
		final ObjectName	objectName	=
				getOldResourcesMBean().createExternalJndiResource( translatedAttrs );
		
		return( objectName );
	
protected java.util.MapgetParamNameOverrides()

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

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