Subscribe

How ChannelExec.isClosed() works

  1. 2011-04-01 13:50:14 PDT
    I'm using JSch to send start command to start JBoss server instance. Which is working fine, I can my server was started but in client code I am checking to see if the channel is closed before returning, but that is taking several minutes to close... Is it my coding bug or JSch bug... Here is my code looks like - channelExec.setCommand(startCommand); channelExec.connect(); while (!channelExec.isClosed()) {sleep;} start command is a command to invoke ksh script which has script to start the server. My understanding was that it should be returning immediately but even after starting the server, executing the script, still channel is open. Is it correct way to ahndle this? any suggestions?? Thanks.
Jump To:
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.