2 Replies Latest reply on Nov 8, 2002 5:45 PM by Juha Lindfors

    MBean and webApp

    Niranjan Kundapur Newbie

      Hello,

      This is the first time I am using JMX (and JBoss) and I might be missing something obvious. I looked at the 'Getting started' doc, the 'JBoss Admin' doc, and the forums but I could not find an answer.

      Here's the problem I am facing on Jboss v3.04 + Tomcat.

      - Let's say I deploy 'myWebApp.war' folder in the default/deploy.

      - The Hello.class and HelloMBean.class (ref. JMX book) are in myWebApp.war/WEB-INF/lib/myMbean.jar.

      - The user-service.xml contains



      The http://localhost:8080/jmx-console shows the 'user' domain and the mBean works as intended.

      It seems unclean to have the JBoss file user-service.xml refer to a jar and mbean in the webApp. My question is whether there is some way 'myWebApp.war' can declare Hello and HelloMBean to the JBoss MBean Server so that the Server can automatically register the HelloMBean, when the webApp is deployed. The web.xml and jboss-web.xml do not allow elements.

      Do I need to use a startupClass to register HelloMBean?

      If some way is possible, then will http://localhost:8080/jmx-console continue to display myMBean?

      Thanks,
      Niranjan