3 Replies Latest reply on May 30, 2002 6:39 AM by Angela Whelan

    MBean notification mechanism

    Angela Whelan Newbie

      hi all,
      I am currently trying to figure out the mbean notification mechanism from Chapter 3 of the JMX book by the JBoss group.

      There is a sample program in this chapter which creates a local MBean server and listeners are registered to it. I have ran that code fine with no problems.

      However, I wish to implement the listener mechanism in a JVM which is different to the local one. For example, my JBoss server is running, I have MBeans registered and running in it, then from a remote client, I wish to add a notifiction listener to an MBean. Is this possible to do ? If it is, can someone tell me where to find source code for this ?

      I have modified an existing piece of code, which searched for and connected to a remote JBossMX server, and invoked an operation on an MBean, but I modified the code by removing the invocation method and replacing it with code which tries to register a listener to an MBean, but I get the following error :

      java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.lang.ClassNotFoundException: imtf.ch.amon.eventtest.ListenerClient$ServiceFilter (no security manager: RMI class loader disabled)
      java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
      java.lang.ClassNotFoundException: imtf.ch.amon.eventtest.ListenerClient$ServiceFilter (no security manager: RMI class loader disabled)
      java.lang.ClassNotFoundException: imtf.ch.amon.eventtest.ListenerClient$ServiceFilter (no security manager: RMI class loader disabled)
      at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
      at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
      at org.jboss.jmx.server.RMIConnectorImpl_Stub.addNotificationListener(Unknown Source)
      at org.jboss.jmx.client.RMIClientConnectorImpl.addNotificationListener(RMIClientConnectorImpl.java:519)
      at imtf.ch.amon.eventtest.ListenerClient.run(ListenerClient.java:148)
      at imtf.ch.amon.eventtest.ListenerClient.main(ListenerClient.java:251)

      any help is greatly appreciated :)
      Thanks, A.