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

    JMX RMI Remote Client Notification Problem

    georgfriedrich

      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

        • 1. Re: JMX RMI Remote Client Notification Problem
          georgfriedrich

          Ok, I solved this problem by deploying my client application, like
          a usual JEE-Client-Application.
          It's not the best solution but it works...

          If I don't connect direct to the JBoss JMX kernel but to the underlying
          JVM, I haven't to deploy my client app and it works. But in this case, I have the
          common RMI random port problem.

          Greetings

          Georg