5 Replies Latest reply on Jun 9, 2006 10:05 AM by Oles Slezka

    creating my own JMX Server

    Oles Slezka Newbie

      I want to use JMX for management of properties of pure beans in WAR archive. And I dont know exactly how usualy it can be realized. I want make it without binding to JBOSS implementation because my war should work in WebLogic too. So, can I make for example JMXAgent like:

      public JMXAgent()
       {
       server = MBeanServerFactory.createMBeanServer("JMXAgent");
       startHTMLAdapter();
       }
       private void startHTMLAdapter()
       {
       HtmlAdaptorServer adapter = new HtmlAdaptorServer();
       ObjectName adapterName = null;
       try
       {
       adapter.setPort(9092);
       adapterName = new
       ObjectName("JMXAgent:name=html,port=9092");
       server.registerMBean(adapter,adapterName);
       adapter.start();
       }
      

      and to register my MBeans with needs for me functions inside it ?
      But in this case I should invoke my JMXConsole in other port (9092) than
      port for application(8080). Is it possible? Advise please a right way!