This content has been marked as final. Show 3 replies
One other bit of information: the code that is trying to register the notification listener on the remote MBean is running as the result of getting a MBeanServererNotification.REGISTRATION_NOTIFICATION notification when the cascading proxy for the remote MBean is registered in the local MBean server.
This is strange because as far as I remember listeners are not serialized. However filters (and possibly handback?) might be sent to the remote side.
What the line that calls addNotificationListener?
I was very silly and used an anonymous inner class for the NotificationFilter, completely forgetting about the implicit pointer to the enclosing, non-serializable class. I made the filter an instance of static inner class and everything is now happy.