MBean Definition File (MDF) Element Syntax

An MBean Definition File (MDF) is an input file to the WebLogic MBeanMaker utility, which uses the file to create an MBean type for managing a custom security provider. An MDF must be formatted as a well-formed and valid XML file that describes a single MBean type. The following sections describe all the elements and attributes that are available for use in a valid MDF:

 


The MBeanType (Root) Element

All MDFs must contain exactly one root element called MBeanType, which has the following syntax:

<MBeanType Name= string   optional_attributes>
     subelements
</MBeanType>

The MBeanType element must include a Name attribute, which specifies the internal, programmatic name of the MBean type. (To specify a name that is visible in a user interface, use the DisplayName and LanguageMap attributes.) Other attributes are optional.

The following is a simplified example of an MBeanType (root) element:

<MBeanType Name="MyMBean" Package="com.mycompany"> 



   <MBeanAttribute Name="MyAttr" Type="java.lang.String" Default="Hello World"/>
</MBeanType>

Attributes specified in the MBeanType (root) element apply to the entire set of MBeans instantiated from that MBean type. To override attributes for specific MBean instances, you need to specify attributes in the MBeanAttribute subelement. For more information, see The MBeanAttribute Subelement.

Table A-1 describes the attributes available to the MBeanType (root) element. The JMX Specification/BEA Extension column indicates whether the attribute is a BEA extension to the JMX specification or a standard JMX attribute. Note that BEA extensions might not function on other J2EE Web servers.

Attribute

JMX Specification
/BEA Extension

Allowed Values

Description

Abstract BEA Extension true/false A true value specifies that the MBean type cannot be instantiated (like any abstract Java class), though other MBean types can inherit its attributes and operations. If you specify true, create other non-abstract MBean types for carrying out management tasks. If you do not specify a value for this attribute, the assumed value is false.
CachingDisabled BEA Extension true/false Ignored. This flag exists to support future functionality. For example, if caching is provided in the types-stubs, this flag may turn off that caching.Currently, MBeans created via the WebLogic MBeanMaker provide server-level caching as per the specification for JMX Model MBeans.

Note: For more information on JMX Model MBeans, see the Java Management eXtensions 1.0 specification.

Classification BEA Extension String A string that you can use to classify or group your MBean types, for example, to identify all MBean types that provide implementations of security authorization. There is no default or assumed value for this attribute.
CurrencyTimeLimit JMX Specification Integer The number of seconds that any value cached is considered fresh. After this value expires, the next attempt to access the value triggers a recalculation.When specified in the MBeanType element, this value is considered the default for MBean types. It can be overridden for individual MBeans by setting the same attribute in the MBean's MBeanAttribute or MBeanOperation subelement.
Deprecated BEA Extension true/false Indicates that the MBean type is deprecated. This information appears in the generated Java source, and is also placed in the ModelMBeanInfo object for possible use by a management application. If you do not specify this attribute, the assumed value is false.
Description JMX Specification String An arbitrary string associated with the MBean type that appears in various locations, such as the Javadoc for generated classes. There is no default or assumed value.

Note: To specify a description that is visible in a user interface, use the DisplayName, DisplayMessage, and PresentationString attributes.

DisplayMessage JMX Specification String The message that a user interface displays to describe the MBean type. There is no default or assumed value.The DisplayMessage may be a paragraph used in Tool Tips or in Help. A DisplayMessage set for the MBean type is considered the default for MBean instances, unless a different value is specified for individual MBeans when the instance is created.
DisplayName JMX Specification String The name that a user interface displays to identify instances of MBean types. For an instance of type X, the default DisplayName is "instance of type X." This value is typically overridden when instances are created.If you use the LanguageMap attribute, the DisplayName value is used as a key to find a name in the LanguageMap's resource bundle. If you do not specify the LanguageMap attribute, or if the key is not present in the resource bundle, the DisplayName value itself is displayed in the user interface. See also MessageID.
Export JMX Specification String The WebLogic MBeanMaker does not use this attribute. However, to support applications that might use it, the WebLogic MBeanMaker adds the value to the MBeanInfo object. There is no default or assumed value.

Note: For more information on the Export attribute, see the Java Management eXtensions 1.0 specification.

Extends BEA Extension Pathname A fully qualified MBean type name that this MBean type extends. See also Implements.
GenerateExtended Accessors BEA Extension true/false A true value enables all MBeanAttribute subelements whose Type is array to generate additional operations and interface methods to support indexed access. A false value prevents all MBeanAttribute subelements from generating additional operations and methods. If you do not specify this attribute, the assumed value is true.
Implements BEA Extension Comma-
separated list
A comma-separated list of fully qualified MBean type names that this MBean type implements. See also Extends.
InstanceExtent BEA Extension true/false A true value specifies that all instances of an MBean type should be retained in a list for faster and easier access. Setting this attribute to true, however, takes up more space.

Note: By default, all security-related MBean types are set to true. If instances of those MBeans override this attribute, security may be adversely impacted.

LanguageMap BEA Extension String Specifies a fully qualified pathname to a resource bundle that contains a map of displayable strings. Other attributes, such as DisplayMessage and DisplayName, use the strings in the LanguageMap to display information about the MBean type.If you do not specify this attribute, other attributes, such as DisplayMessage and DisplayName, display their own values (as opposed to using their values as a key to find appropriate strings in the resource bundle).
Listen BEA Extension true/false Causes a stub for a notification listener to be generated in the MBean implementation object. If you do not specify this attribute, the assumed value is false.

Note: For more information about listener stubs, see the Java Management eXtensions 1.0 specification.

Log JMX Specification true/false A true value specifies that notifications for the MBean type are added to the log file. (The LogFile attribute specifies the file into which the information should be written.) If you do not specify this attribute, the assumed value is false, and notifications are not added to the log file.

Note: For more information about MBean notifications and logs, see the Java Management eXtensions 1.0 specification.

LogFile JMX Specification Pathname The fully qualified pathname of an existing, writable file into which messages are written when notifications occur for this MBean type. For logging to occur, the Log attribute must be set to true. There is no default or assumed value for this attribute.

Note: For more information about MBean notifications and logs, see the Java Management eXtensions 1.0 specification.

MBeanClassName BEA Extension Pathname A fully qualified classname that is a subclass of an MBean type BEA provides. This is included primarily for future development and for those wanting to extend Model MBeans.

Note: For more information on JMX Model MBeans, see the Java Management eXtensions 1.0 specification.

MessageID JMX Specification String Provides a key for retrieving a message from a client-side message repository per the Java Management eXtensions 1.0 specification.You can use MessageID, or DisplayMessage, or both to describe a notification MBean type. If you do not specify this attribute, no message ID is available.

Note: MessageID does not use the same resource bundle that the LanguageMap attribute specifies, and it is available for notification MBean types only.

Name JMX Specification String Mandatory attribute that specifies the internal, programmatic name of the MBean type.
Package BEA Extension String Specifies the package name of the MBean type and determines the location of the class files that the WebLogic MBeanMaker creates. If you do not specify this attribute, the MBean type is placed in the Java default package.

Note: MBean type names can be the same as long as the package name varies.

PersistLocation JMX Specification Pathname The WebLogic MBeanMaker does not use this attribute. However, to support cases where an MBean type extends Model MBeans that do use PersistLocation, the WebLogic MBeanMaker adds the value to the MBeanInfo class. There is no default or assumed value.

Note: For more information about PersistLocation and Model MBeans, see the Java Management eXtensions 1.0 specification.

PersistName JMX Specification String The WebLogic MBeanMaker does not use this attribute. However, to support cases where an MBean type extends Model MBeans that do use PersistName, WebLogic MBeanMaker adds the value to the MBeanInfo class. There is no default or assumed value.

Note: For more information about PersistName and Model MBeans, see the Java Management eXtensions 1.0 specification.

PersistPeriod JMX Specification Integer Specifies the number of seconds that the OnTimer or NoMoreOftenThan persistence policies use. If you do not specify this attribute in the MBeanType or MBeanAttribute elements, the assumed value is 0.If PersistPolicy is set to OnTimer, then the attribute is persisted when the number of seconds expires. If PersistPolicy is set to NoMoreOftenThan, then persistence is constrained to happen not more often than the specified number seconds.

Note: When specified in the MBeanType element, this value overrides any setting within an individual MBeanAttribute subelement.

PersistPolicy JMX Specification Never
/OnTimer
/OnUpdate
/NoMoreOftenThan
Specifies how persistence will occur:

  • Never. The attribute is never stored. This is useful for highly volatile data or data that only has meaning within the context of a session or execution period.

  • OnTimer. The attribute is stored whenever the MBean type's persistence timer, as defined in the PersistPeriod attribute, expires.

  • OnUpdate. The attribute is stored every time the attribute is updated.

  • NoMoreOftenThan. The attribute is stored every time it is updated unless the updates are closer together than the PersistPeriod. This mechanism helps prevent temporarily highly volatile data from affecting performance.
If you do not specify this attribute in the MBeanType or MBeanAttribute elements, the assumed value is Never.

Note: When specified in the MBeanType element, this value overrides any setting within an individual MBeanAttribute subelement.

PresentationString JMX Specification Pathname A fully qualified pathname to a single XML document that provides information that a user interface can use to display the item. The XML document provides additional metadata that is relevant to presentation logic. The format of the PresentationString is any XML/JMX-compliant information.

Note: BEA does not currently define a specialized format, and recommends that customers wait before defining their own. The PresentationString attribute is for future use.

Readable JMX Specification true/false Determines whether an MBean attribute's value can be read through the MBean API. If you do not specify this attribute in the MBeanType or MBeanAttribute elements, the assumed value is true.When specified in the MBeanType element, this value is considered the default for individual MBeanAttribute subelements.
Servers