(resourceType.equals(STANDARD_MBEAN)))
{
dynamicResource = false;
// create and configure the builder
MetaDataBuilder builder = new StandardMetaData(resource);
// pass the config keys to the builder instance
for (Iterator it = properties.keySet().iterator(); it.hasNext();)
{
String key = (String)it.next();
builder.setProperty(key, properties.get(key));
}
// build the metadata
MBeanInfo standardInfo = builder.build();
// StandardMetaData is used by the MBean server to introspect
// standard MBeans. We need to now turn that Standard metadata into
// ModelMBean metadata (including operation mapping for attributes)
minfo = MBeanInfoConversion.toModelMBeanInfo(standardInfo, CREATE_ATTRIBUTE_OPERATION_MAPPING);
}
// If the resource type string ends with an '.xml' extension attempt
// to create the metadata with the aggregated XML builder.
else if (resourceType.endsWith(".xml"))
{
// Create and configure the builder. XMLMetaData builder is an
// aggregate builder that picks the correct schema specific builder
// based on schema declaration at the beginning of the XML file.
MetaDataBuilder builder = new XMLMetaData(
this.getClass().getName(), // MMBean implementation name
resource.getClass().getName(), // resource class name
resourceType
);
// pass the config keys to the builder instance
for (Iterator it = properties.keySet().iterator(); it.hasNext();)
{
String key = (String)it.next();
builder.setProperty(key, properties.get(key));
}
minfo = (ModelMBeanInfo) builder.build();
}
// Sotre the ModelMBeanInfo
this.setModelMBeanInfo(minfo);
// we must try to load this MBean (as the superclass does), even if only NullPersistence