[ mx4j-Bugs-847322 ] NotificationBroadcasterSupport error/failed remote listener

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.mx4j.devel
Message-ID <[email protected]>
Bugs item #847322, was opened at 2003-11-22 13:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=847322&group_id=47745

Category: JMX implementation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Aaron Mulder (ammulder)
Assigned to: Nobody/Anonymous (nobody)
Summary: NotificationBroadcasterSupport error/failed remote listener

Initial Comment:
I have a NotificationListener of type Remote that is
registered with an MBeanServer in a remote VM.  When I
shut down the VM that the listener is in, this leaves
the server VM with a disconnected stub.  The
NotificationBroadcasterSupport class does not handle
this gracefully.

    [java] Caused by:
java.lang.reflect.UndeclaredThrowableException
    [java]      at $Proxy0.hashCode(Unknown Source)
    [java]      at
mx4j.server.interceptor.NotificationListenerMBeanServerInterceptor$ListenerWrapper.hashCode(NotificationListenerMBeanServerInterceptor.java:67)
    [java]      at java.util.HashMap.hash(HashMap.java:261)
    [java]      at
java.util.HashMap.putForCreate(HashMap.java:404)
    [java]      at
java.util.HashMap.putAllForCreate(HashMap.java:425)
    [java]      at
java.util.HashMap.clone(HashMap.java:656)
    [java]      at
javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:257)

It looks like the calculation of the HashCode fails for
the disconnected stub, and this is not one of the
operations that the NotificationListener it prepared
for failure on.

Additionally, I'd ideally like some way to cause the
failed listener to be removed automatically, so this
exception doesn't crop up on every notification forever
more.  Unfortunately, there's no apparent way from the
outside to determine exactly which NotificationListener
failed, so I think perhaps this must be done
automatically within NotificationBroadcasterSupport.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=847322&group_id=47745


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.