2 Replies Latest reply on Jul 16, 2004 2:06 AM by setya

    Question on this MBean Service

    setya

      Hi all,

      I have defined the following service in user-service.xml :

      <mbean code="com.Foo" name="Company:Service=Foo">
       <attribute name="ID">Foo</attribute>
       <attribute name="Key">
       <property name="Index" value="1"/>
       <property name="Caption" value="Bar"/>
       </attribute>
      </mbean>
      


      I don't have problem retrieving the value of attribute "ID", but how to get the value of sub elements of "Key" ? I tried to define getter and setter for "Index" and "Caption" but the value is not delivered.

      Any help would be greatly appreciated.


      Setya

        • 1. Re: Question on this MBean Service

           

          public void setKey(Element key)
          {
          // use the xml element
          }
          


          • 2. Re: Question on this MBean Service
            setya

            Thanks for the response,

            I've tried to use org.w3c.dom.Element as parameter type but it throws the following exception :

            org.jboss.deployment.DeploymentException: No property editor for attribute: Key; type=interface org.w3c.dom.Element

            I notice that MBean service org.jboss.mail.MailService also has similliar parameter type, but it runs fine. What's wrong ?


            Setya