6 Replies Latest reply on Sep 15, 2008 7:32 AM by hamtho2

    XMBean Default values now shown in JMX

    bossy

      Hello,
      I've got an XMBean for which attributes I provided default values in the descriptor xml file.
      This is my jboss-service.xml

      <server>
       <mbean code="com.xxx.jmx.ConfigXMBean" name="BBB:service=Config"
       xmbean-dd="META-INF/config-xmbean.xml">
       </mbean>
      </server>

      In config-xmbean.xml I have:
      ...
      <mbean>
       <description>The JNDIMap XMBean </description>
      
       <descriptors>
       <persistence persistPolicy="OnUpdate"
       persistPeriod="10"
       persistLocation="${jboss.server.data.dir}"
       persistName="JNDIMap.ser"/>
       <currencyTimeLimit value="10"/>
       <state-action-on-update value="keep-running"/>
       <persistence-manager value="org.jboss.mx.persistence.ObjectStreamPersistenceManager" />
       </descriptors>
      
       <class>org.jboss.test.jmx.xmbean.JNDIMap</class>
      
       <constructor>
       <description>The default constructor</description>
       <name>JNDIMap</name>
       </constructor>
      
       <!-- Attributes -->
      
       <attribute access="read-write" getMethod="getHost" setMethod="setHost" >
       <description>The IP address of the server</description>
       <name>Host</name>
       <type>java.lang.String</type>
       <descriptors>
       <default value="111.222.333.444" />
       </descriptors>
       </attribute>
      
      .....


      When I run the JMX console I would expect to see the value 111.222.333.444 there , but I don't. The field is empty.
      If this is the correct behavior could someone tell me how and when is this default value used? Or am I missing something in the wml file?
      Thank you.