Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2EAF917DA8 for ; Fri, 3 Oct 2014 20:06:05 +0000 (UTC) Received: (qmail 70898 invoked by uid 500); 3 Oct 2014 20:06:05 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 70845 invoked by uid 500); 3 Oct 2014 20:06:05 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 70832 invoked by uid 99); 3 Oct 2014 20:06:05 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Oct 2014 20:06:05 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id C0C909C41AE; Fri, 3 Oct 2014 20:06:04 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lahiru@apache.org To: commits@airavata.apache.org Date: Fri, 03 Oct 2014 20:06:04 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: removing session.disconnect during error because we maintain session in static level Repository: airavata Updated Branches: refs/heads/master 2b0b6a272 -> 650933484 removing session.disconnect during error because we maintain session in static level Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/42fee53e Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/42fee53e Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/42fee53e Branch: refs/heads/master Commit: 42fee53eb8cc956480a0fc6888ccf720020a2dc9 Parents: 1ef608c Author: lahiru Authored: Fri Oct 3 16:05:00 2014 -0400 Committer: lahiru Committed: Fri Oct 3 16:05:00 2014 -0400 ---------------------------------------------------------------------- .../org/apache/airavata/gsi/ssh/api/CommandExecutor.java | 10 +++++----- .../airavata/gsi/ssh/impl/GSISSHAbstractCluster.java | 2 +- .../java/org/apache/airavata/gsi/ssh/util/SSHUtils.java | 9 ++++----- 3 files changed, 10 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/42fee53e/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java ---------------------------------------------------------------------- diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java index 070e718..d26ca06 100644 --- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java +++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java @@ -64,7 +64,7 @@ public class CommandExecutor { channel = session.openChannel("exec"); ((ChannelExec) channel).setCommand(command); } catch (JSchException e) { - session.disconnect(); +// session.disconnect(); throw new SSHApiException("Unable to execute command - ", e); } @@ -76,7 +76,7 @@ public class CommandExecutor { } catch (JSchException e) { channel.disconnect(); - session.disconnect(); +// session.disconnect(); throw new SSHApiException("Unable to retrieve command output. Command - " + command, e); } @@ -237,7 +237,7 @@ public class CommandExecutor { channel = session.openChannel("exec"); ((ChannelExec) channel).setCommand(command); } catch (JSchException e) { - session.disconnect(); +// session.disconnect(); throw new SSHApiException("Unable to execute command - " + command + " on server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + @@ -254,7 +254,7 @@ public class CommandExecutor { } catch (JSchException e) { channel.disconnect(); - session.disconnect(); +// session.disconnect(); throw new SSHApiException("Unable to retrieve command output. Command - " + command + " on server - " + serverInfo.getHost() + ":" + serverInfo.getPort() + @@ -265,7 +265,7 @@ public class CommandExecutor { commandOutput.onOutput(channel); channel.disconnect(); - session.disconnect(); +// session.disconnect(); } private static void logDebug(String message) { http://git-wip-us.apache.org/repos/asf/airavata/blob/42fee53e/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java ---------------------------------------------------------------------- diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java index b5e0802..ee4c0cb 100644 --- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java +++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java @@ -601,6 +601,6 @@ public class GSISSHAbstractCluster implements Cluster { } public void disconnect() throws SSHApiException { - getSession().disconnect(); +// getSession().disconnect(); } } http://git-wip-us.apache.org/repos/asf/airavata/blob/42fee53e/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java ---------------------------------------------------------------------- diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java index 20bd042..9cafde6 100644 --- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java +++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java @@ -213,7 +213,6 @@ public class SSHUtils { throw new SSHApiException(stdOutReader.getStdErrorString()); } channel.disconnect(); - session.disconnect(); } /** @@ -567,7 +566,7 @@ public class SSHUtils { out.flush(); } - session.disconnect(); +// session.disconnect(); stdOutReader.onOutput(channel); if (stdOutReader.getStdErrorString().contains("scp:")) { @@ -715,8 +714,8 @@ public class SSHUtils { channel.connect(); } catch (JSchException e) { - channel.disconnect(); - session.disconnect(); +// channel.disconnect(); +// session.disconnect(); throw new SSHApiException("Unable to retrieve command output. Command - " + command + " on server - " + session.getHost() + ":" + session.getPort() + @@ -747,7 +746,7 @@ public class SSHUtils { } catch (JSchException e) { channel.disconnect(); - session.disconnect(); +// session.disconnect(); throw new SSHApiException("Unable to retrieve command output. Command - " + command + " on server - " + session.getHost() + ":" + session.getPort() +