[ http://issues.apache.org/jira/browse/MODELER-10?page=all ] Dennis Lundberg resolved MODELER-10: ------------------------------------
Resolution: Invalid See comment by Bill Barker. > [modeler] DTD violation when using simple wrapping > -------------------------------------------------- > > Key: MODELER-10 > URL: http://issues.apache.org/jira/browse/MODELER-10 > Project: Commons Modeler > Type: Bug > Environment: Operating System: other > Platform: Other > Reporter: L. Hahn > Attachments: modeler.diff.bz2 > > - using MBean implementation of sun j2sdk 1.5.0_02 win 32 bit > When just wrapping a class without overriding BaseModelMBean, a working > configuration looks like this: > -------------------- 8< ---------------------- > <mbeans-descriptors> > <mbean name="myNonDefaultDomain:name=Pool" > className="dontCare" > description="Object Pool" > domain="dontCare" > group="dontCare" > code="my.package.Pool" > type="dontCare"> > <attribute name="Size" > description="number of currently pooled objects" > type="java.lang.Integer" > writeable="true"/> > </mbean> > </mbeans-descriptors> > -------------------------- >8 ------------------------ > The class my.package.Pool: > -------------------- 8< ---------------------- > package my.package; > public class Pool > { > Integer size = new Integer(42); > public Pool(){} > > public Integer getSize() { > return size; > } > public void setSize(Integer size) > { > this.size = size; > } > } > -------------------------- >8 ------------------------ > The code to register the MBean inside the platform MBean server: > -------------------------- 8< ------------------------ > URL url= this.getClass().getResource("MBeanConfig.xml"); > Registry registry = Registry.getRegistry(null, null); > registry.setMBeanServer(ManagementFactory.getPlatformMBeanServer()); > registry.loadMetadata(url); > registry.loadMBeans(url); > --------------------------- >8 ----------------------- > The field viewed with jconsole (local connected) is > MBeans=>Tree=>myNonDefaultDomain=>Pool=>size = 42 > Following the API-Docs one would expect > -------------------- 8< ---------------------- > <mbeans-descriptors> > <mbean name="Pool" > className="my.package.Pool" > description="Object Pool" > domain="myNonDefaultDomain" > group="dontCare" > type="dontCare"> > <attribute name="Size" > description="number of currently pooled objects" > type="java.lang.Integer" > writeable="true"/> > </mbean> > </mbeans-descriptors> > -------------------------- >8 ------------------------ -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]