issues with JxtaBiDiPipe
Cyrille FOLLEAU <[email protected]> Mon, 19 Sep 2005 17:44:57 +0200
| Newsgroups | gmane.comp.java.jxta.user |
|---|---|
| Message-ID | <OFF5A94363.22C8D91C-ONC1257081.0055E2C4-C1257081.00568233@ds-fr.com> |
Hi John I also had troubles with JxtaBiDiPipe (disconnection) My Java Application was running at Low priority level, the day I set it to Normal priotity level my troubles disappeared. It may be same for you. Regards Cyrille "John D. Blair" <[email protected]> 19/09/2005 06:48 Veuillez répondre à user Pour : [email protected] cc : (ccc : Cyrille FOLLEAU/dassault-systemes) Objet : [JXTA user] issues with JxtaBiDiPipe I'm experimenting with using JxtaBiDiPipe. I use a JxtaBiDiPipe to create a reliable bidirectional pipe from a client to a server. I have been examining what happens if the server side (the side with the JxtaServerPipe instance) fails and exits ungracefully, without making any attempt to tear down the pipe. When this happens, I see the following: 1) The JxtaBiDiPipe on the client side continues to accept messages for about 30 seconds, throwing no exceptions and returning true as if it is working properly. 2) After about 30 more seconds it throws IOException: stream is being closed. It continues to throw this exception for as long as I have watched the program run (about 5 minutes). A stack trace indicates the exception is originating from ReliableOutputStream. Attempting to close the pipe in response to the IOException has no effect on the situation, presumably b/c it is being closed already. However, it never seems to finish closing. Further, if I start the server side back up again (either before the exceptions begin to be thrown, or after), the client side never rediscovers the server side of the pipe and re-establishes the connection. Since I see this rediscovery behavior when using pairs of ordinary OutputPipe/InputPipe objects, I was hoping to see it with JxtaBiDiPipes as well. My question: Is this expected behavior, or is this a bug? If this is expected behavior, how do I discard the JxtaBiDiPipe that is no longer working so I can free its resources and open a new connection? Thanks much for the help! Aside: I was hoping the bidi pipe would deal with the failure of the remote endpoint the way the conventional OutputPipe does-- by searching for a new peer advertising the same pipe and connecting to it. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]