1 Reply Latest reply on Aug 8, 2005 6:32 PM by genman

    How to enter values for my custom mbean parameters?

    richaosu

      Say I have an mbean that exposes a method whose parameter is an object that I created. Say the parameter is com.mycompany.Customer and that object has properties for Name, Age, Address, Phone, etc. Is it possible to use the jmx-console to enter values for my Customer object? Do I need to configure properties-service.xml? If so, are there any examples?

        • 1. Re: How to enter values for my custom mbean parameters?
          genman

          Yes and yes.

          Create an editor like this and put it in server/default/lib ...

          public class InternetAddressEditor
           extends PropertyEditorSupport
          {
          
           /**
           * Returns the property as a String.
           */
           public String getAsText() {
           return getValue().toString();
           }
          
           /**
           * Sets as a InternetAddress created by a String.
           */
           public void setAsText(String text) {
           try {
           setValue(new InternetAddress(text));
           } catch (AddressException e) {
           throw new ChainedRuntimeException(e);
           }
           }