4 Replies Latest reply on Feb 15, 2006 11:22 AM by chwang

    How to solve a listener in WAR issue?

      Hi Folks,

      I have Mbean in sar, after the state of MBean has been changed, it will notify listener. But my listener is a servlet in war.
      I added the listener in a code in war:

      ObjectName objectName = new ObjectName("com.outputprocess.jmxservice:service=Hello");

      MBeanServer server = MBeanServerLocator.locateJBoss();

      HelloMBean mbean=(HelloMBean)MBeanServerInvocationHandler.newProxyInstance(server,objectName,HelloMBean.class,false);

      MBeanListener myMBeanListener = new MBeanListener();
      server.addNotificationListener(objectName, myMBeanListener, null, null );

      When I changed a state of Hello Mbean, it complains ClassLoadNotFoound exception.

      I know the listener is in war, not in sar.

      How can MBean notify to a listener in war?

      Thank you very much for your help.

      Chwang