Change Notes item #561710, was opened at 2002-05-29 01:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=381174&aid=561710&group_id=22866

Category: JBossMX
Group: None
Status: Open
Priority: 5
Submitted By: Juha Lindfors (juhalindfors)
Assigned to: Juha Lindfors (juhalindfors)
Summary: XMBean supports Descriptor resource type

Initial Comment:
XMBean Model MBean implementation now supports
DESCRIPTOR (value defined in XMBeanConstants) as its
resource type. Using a descriptor allows property map
to be supplied to the Model MBean instance describing
how to initialize and configure the Model MBean
instance to represent the managed resource.

You can use either one of the two constructors:

  XMBean(Object resource, String type)
  XMBean(Descriptor)

The former requires an instance of
javax.management.Descriptor supplied as resource object
and XMBeanConstants.DESCRIPTOR supplied as type. The
descriptor MUST contain at least two fields:
RESOURCE_REFERENCE and RESOURCE_TYPE. Former must have
the reference to the actual resource object as its
value, and the latter must include the actual type of
the resource object. The XMBean implementation will
extract this information and use it to register the
Model MBean.

For instance:

  Descriptor d = new DescriptorSupport();
  d.setField(RESOURCE_REFERENCE, new SomeObject());
  d.setField(RESOURCE_TYPE, "http://URL/intrface.xml";);

  ModelMBean mmb = new XMBean(d);
  server.registerMBean(name, mmb);

to set up a resource object whose management interface
is generated from the given XML document instance.

Descriptors allow client more control on how the Model
MBean is configured. For instance, to disable the
validation of the XML document instance the client can
provide the following descriptor:

  Descriptor d = new DescriptorSupport();
  d.setField(RESOURCE_REFERENCE, new Object());
  d.setField(RESOURCE_TYPE, "http://URL/intrface.xml";);
  d.setField(XML_VALIDATION, "true");

  ModelMBean mmb = new XMBean(d);
  server.registerMBean(name, mmb);

The descriptor fields define a naming pattern scheme
similar to JMX notifications: a dot separated identity
string. These are defined as part
XMBEAN_DESCRIPTOR_PREFIX, RESOURCE_DESCRIPTOR_PREFIX
and METADATA_DESCRIPTOR_PREFIX. For instance, all
fields matching the METADATA_DESCRIPTOR_PREFIX will be
automatically delegated by the XMBean implementation to
all MetaDataBuilder implementations via the
setProperty() method. This allows the client to
configure and extend custom builder implementations.

Descriptors will later be used to setup ModelMBean
instances mapping to multiple resource objects.


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=381174&aid=561710&group_id=22866

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to