2 Replies Latest reply on Dec 13, 2003 2:38 AM by yapex

    How to use jmx without JNDI

    yapex Newbie

      public class HelloWorld implements HelloWorldMBean {
      private String greeting;
      public String getGreeting() {
      return greeting;
      }

      public void setGreeting(String message) {
      this.greeting = message;
      }

      public String getGreeting() {
      return greeting;
      }
      }

      public interface HelloWorldMBean {
      public void setGreeting( String message );
      public String getGreeting();
      public void printGreeting();
      }

      I have already registed HelloWorldMBean in jboss, and I can manage it in jboss's jmx-console.
      But how can I use it in other class. For example, I want to get changed greeting in another java class,
      how can I do it in an easy way. I don't set MBean's JNDI name yet.

      Must I find MBeanServer first, then find the MBean? I'm new to jmx, Please show me an example, thanks.