6 Replies Latest reply on May 4, 2005 6:28 PM by dimitris

    addNotificationListener on Tomcat final start?

    jivkoto

      Hi,

      I would like to know how could I be notified when web server in jboss (jboss 3.2.6) is finally started. I have mBean which i need to be notified when Tomcat is started. I know that i have to register notification listener. First i am wondering on which service? Is it jboss.web:service=WebServer?

      ObjectName webMBean = new ObjectName("jboss.web", "service", "WebServer");
      mbServer.addNotificationListener(webMBean, this, null, null);

      Then here comes the next question what type of notification i should listen for:

      public void handleNotification(Notification notification, Object object)
      {
      String type = notification.getType();
      if ("WHAT_IS_HERE".equals(type))
      { ......}
      }

      I would be thankful if someone share experience and tell me which is the service and what type to filter for:)