1 Reply Latest reply on Feb 27, 2007 6:04 AM by Georg Friedrich

    JMX RMI Remote Client Notification Problem

    Georg Friedrich Newbie

      Hi,

      I have to write an Eclipse RCP based Client for our JEE Application.
      I'm using JBoss 4.0.5.GA with JDK 5 and I have a problem with JMX notifications.
      I can successfully connect to the MBeanServer with:

      MBeanServerConnection server = (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");

      and the
      server.isRegistered(new ObjectName("MY_OBJECT_NAME"));

      will be successfully executed.

      But if I want to register one of my Rich-Client classes as a NotificationListener I become an error:
      Caused by: java.lang.NoClassDefFoundError: my/package/MyNotificationListener


      Sure, JBoss do not know all of my Rich-Client classes, because I don't copy all of my classes into the $JBOSS_HOME/server/default/lib folder for example!

      The "addNotificationListener(...)" call is only successfull, if I use a class which is only do a simple System.out and don't know any of my other classes.

      What can I do? I have searched in WIKI, FAQJBossJMX, in this Board, google,... nothing! All examples (e.g. http://wiki.jboss.org/wiki/Wiki.jsp?page=HowDoIAddANotificationListenerToARemoteMBeanServer) only do a System.out in the
      public void handleNotification(Notification notification, Object handback)
      and do not call another listener. :-/

      Thanks for any suggestions...

      Georg