Re: issues with JxtaBiDiPipe

Mohamed Abdelaziz <[email protected]> Mon, 19 Sep 2005 08:27:28 -0700
Newsgroups gmane.comp.java.jxta.user
Message-ID <[email protected]>
1- Closure, it is not a normal behavior for a JxtaBiDiPipe/Reliable 
Library not being able to recover from a hard remote failure. and should 
be addressed as bug.

2- It appears that lack of output activity leads to the bug observed. 

- JxtaBiDiPipe/JxtaSocket Migration is limited to physical endpoint 
migration. Applications are expected to reattempt connections when a 
bidirectional connection fails.  Connection pipe is fully supported, and 
ephemeral pipe migration is not.

Mohamed

-- 
http://blogs.sun.com/roller/page/hamada
http://weblogs.java.net/blog/hamada



John D. Blair wrote:

> 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.