FileDocCategorySizeDatePackage
CustomMBeanConfig.javaAPI DocGlassfish v2 API4737Fri May 04 22:30:32 BST 2007com.sun.appserv.management.config

CustomMBeanConfig

public interface CustomMBeanConfig implements ObjectType, Description, Enabled, PropertiesAccess, DeployedItemRefConfigReferent, NamedConfigElement
Configuration for custom MBean.

When a Custom MBean is loaded, the object name specified via the 'ObjectNameInConfig' Attribute is used. The JMX Domain will always be {@link #JMX_DOMAIN}.

If there is a name specified in 'ObjectNameInConfig' eg "name=name1", that name is used and the name as returned by {@link #getName} is not used within the ObjectName.

Note the following:

  • The MBean is dynamically registered or deregistered upon enabling it.
  • If an MBean is created with a certain ObjectName, a property "server=<server-name>" is added to the ObjectName's representation, when the MBean is being registered with the MBeanServer. The "server-name" above refers to the name of the application server instance. If you deploy it to the admin server ifself, then the property added is: "server=server".
  • If an ObjectName is not specified, then an ObjectName is created by the server.
  • The MBean domain name for a custom MBean is user .
Questions
  • When setEnabled( true/false ) is called, are custom MBeans dynamically loaded and unloaded? Document this here.
  • How to obtain the ObjectName for the runtime MBean that this config specifies?
  • Are runtime MBeans loaded only in the DAS, or in each server? What about the Node Agent? If they are loaded per server, what is put into the ObjectName to distinguish them?
  • All these either/or cases are confusing. We should restrict the object-name Attribute to properties, prohibit a 'name' property, and require a 'type' property--my opinion--Lloyd
see
com.sun.appserv.management.config.DomainConfig#getCustomMBeanConfigMap

Fields Summary
public static final String
J2EE_TYPE
The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType}.
public static final String
JMX_DOMAIN
The JMX domain in which all custom MBeans are registered by default.
Constructors Summary
Methods Summary
public java.lang.StringgetImplClassname()
Get the implementation class. This Attribute is read-only.

public java.lang.StringgetObjectNameInConfig()
Get the ObjectName as configured (which could differ from the ObjectName with which the MBean is registered--TBD). This Attribute may not be changed; it is read-only.