4 Replies Latest reply on Dec 19, 2011 9:19 AM by jaikiran

    Migrate jmx from jboss 6

    zgood

      Hello!

       

      I am trying to migrate jmx mbean to jboss 7.1 Beta1. I have simple example:

      Here is interface:

       

      {code}

      package test;

       

      import org.jboss.ejb3.annotation.Management;

       

      @Management

      public interface TestManagment {

       

          public String test();

       

          void create() throws Exception;

       

          void start() throws Exception;

       

          void stop();

       

          void destroy();

       

      }

      {code}

       

      Here is implementation:

       

      {code}

      package test;

       

      import org.jboss.logging.Logger;

      import org.jboss.ejb3.annotation.Service;

       

      @Service(objectName = "test:name=Test")

      public class TestJmx implements TestManagment {

       

          private static final Logger LOG = Logger.getLogger(BalancerJmx.class);

       

          @Override

          public void create() throws Exception {

              LOG.info("created");

          }

       

          @Override

          public void start() throws Exception {

              LOG.info("start");

          }

       

          @Override

          public void stop() {

              LOG.info("stop");

          }

       

          @Override

          public void destroy() {

              LOG.info("destroyed");

          }

       

          @Override

          public String test() {

              LOG.info("test");

              return "test";

          }

       

      }

      {code}

       

      This example works in jboss 6, but not work in 7. Does Tesla support mbean declaration with annotation?