Re: Channel/Seesion Closed

Bernardo F Costa <[email protected]>
Newsgroups gmane.comp.java.sshtools.user
Message-ID <[email protected]>
Hmm, sorry but I never got such kind of reply from
sshtools. In fact, I didn't know that we could re-use
the same SessionClient more than once. All my
programming was using one SessionClient for each
command sent. When I tried to re-use the same
SessionClient, an Exception was caught saying
something about connection or output/input stream
closed. Have you already made a test with full debug
log level enabled ? With debug level enabled, maybe
you could know who/when is closing the output stream
you're trying to re-use.

--- Ziv <[email protected]> escreveu:

> 
> Hi Bernardo,
> 
> Thanks for the quick reply.
> My problem is not exactly as the one you describe.
> I am able to communicate with the remote server for
> some time using the same
> session, but after some time, when I read from the
> session's input stream, I
> receive an answer shorter than the answer I expect
> (meaning, not all the
> bytes are transferred from the server to me), and
> after that, when I try to
> write to the output stream, I get the IOException
> described below (before
> this exception I get no other exception).
> 
> Please let me know if you know of something that
> could be the reason for
> this behaviour.
> 
> Thanks,
> 
> Ziv
> 
> 
> Bernardo F Costa wrote:
> > 
> > I also had the same problem when I started using
> > sshTools to execute remote comands. It looks like
> it's
> > default behaviour is to close the SessionChannel
> after
> > the remote command has executed and it's output
> > available, although the connection is still open.
> So,
> > when programming, I had to open a new
> SessionClient
> > everytime Iwante to execute a remote command. 
> > One other thing that could have happenned is the
> > closing of all SessionChannels after an unexpected
> > exception.


__________________________________________________
Fale com seus amigos  de graça com o novo Yahoo! Messenger 
http://br.messenger.yahoo.com/ 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
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.