[ mx4j-Bugs-851478 ] NotificationListener when server shutdown
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #851478, was opened at 2003-11-30 08:50
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=851478&group_id=47745
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Noah Body (sherington)
Assigned to: Nobody/Anonymous (nobody)
Summary: NotificationListener when server shutdown
Initial Comment:
Hi,
I've just started using MX4J and remoting.
What I have is a server application (a Swing application) that creates an RMI Server Connector much like the RMI example that ships in the MX4J distribution.
I have an MBean implementation that extends NotificationBroadcasterSupport.
I also have a client application that connects to the server and registers a notification listener. The notification listener simply prints out the Notification to System.out.
Everything works fine, notifications get sent remotely without any problems - until I shut down my server application. When I shut down the server, I get a tight loop of this exception thrown over and over in the client application:
(JDK 1.4.2)
Caught IOException from fetchNotifications
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.io.EOFException
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:203)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.fetchNotifications(Unknown Source)
at javax.management.remote.rmi.RMIConnector$1.fetchNotifications(RMIConnector.java:87)
at mx4j.remote.RemoteNotificationClientHandler$NotificationFetcherThread.run(RemoteNotificationClientHandler.j
ava:287)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:333)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:189)
... 5 more
Caught IOException from fetchNotifications
java.rmi.ConnectException: Connection refused to host: 192.168.0.1; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
at javax.management.remote.rmi.RMIConnectionImpl_Stub.fetchNotifications(Unknown Source)
at javax.management.remote.rmi.RMIConnector$1.fetchNotifications(RMIConnector.java:87)
at mx4j.remote.RemoteNotificationClientHandler$NotificationFetcherThread.run(RemoteNotificationClientHandler.j
ava:287)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
... 7 more
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=851478&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/