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

CustomMBeanConfigFactory

public final class CustomMBeanConfigFactory extends ConfigFactory

Fields Summary
Constructors Summary
public CustomMBeanConfigFactory(ConfigFactoryCallback callbacks)

		super( callbacks );
	
Methods Summary
public javax.management.ObjectNamecreate(java.lang.String name, java.lang.String implClassname, java.lang.String objectName, boolean enabled, java.util.Map optional)

		final String[] requiredParams = new String[]
		{
		CustomMBeanConstants.NAME_KEY,             name,
		CustomMBeanConstants.IMPL_CLASS_NAME_KEY,  implClassname,
		CustomMBeanConstants.OBJECT_NAME_KEY,      objectName,
		CustomMBeanConstants.ENABLED_KEY,     "" + enabled,
		};
		final Map<String,String> params	= initParams( name, requiredParams, optional );

		final ObjectName	amxName = createNamedChild( name, params );
		return amxName;           
	
protected javax.management.ObjectNamecreateOldChildConfig(javax.management.AttributeList translatedAttrs)
The caller is responsible for dealing with any Properties.

	    final Map<String,String> m   = 
	        JMXUtil.attributeListToStringMap( translatedAttrs );
	    
	    final String    DOMAIN  = null; // magic value 
		final String	name	= getOld().createMBean( DOMAIN, m );
		
		final ObjectName  objectName  = getOld().getMbeanByName( name );
		
	    debug( "created custom MBean with name: " + objectName );
		return( objectName );
	
private com.sun.enterprise.management.support.oldconfig.OldApplicationsConfigMBeangetOld()

        return getOldConfigProxies().getOldApplicationsConfigMBean();
    
private final java.lang.StringgetRefContainerName(java.lang.String name)

	    final QueryMgr  queryMgr    = getDomainRoot().getQueryMgr();
	    
	    // this is all bug-workaround code
	    final Set<DeployedItemRefConfig> refs   =
	        RefHelper.findAllRefConfigsWithName( queryMgr, XTypes.DEPLOYED_ITEM_REF_CONFIG, name );
	       
	    final RefConfig ref = GSetUtil.getSingleton( refs );
	    final Container refContainer   = ref.getContainer();
	    
	    return refContainer.getName();
	
public final voidremoveByName(java.lang.String name)

	    // bug-workaround code
		getOld().deleteMBean( getRefContainerName( name ), name );