You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/05/26 14:48:21 UTC

DO NOT REPLY [Bug 35091] New: - DTD violation when using simple wrapping.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35091>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35091

           Summary: DTD violation when using simple wrapping.
           Product: Commons
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Modeler
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: hahn@immobilienscout24.de


- 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 ------------------------

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org