airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata git commit: fixing session connect issue
Date Thu, 17 Dec 2015 18:51:34 GMT
Repository: airavata
Updated Branches:
  refs/heads/master d8cb96589 -> 55f8e2509


fixing session connect issue


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/55f8e250
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/55f8e250
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/55f8e250

Branch: refs/heads/master
Commit: 55f8e2509ef96598bac19a6f9619aabaeb79d61e
Parents: d8cb965
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Thu Dec 17 13:51:30 2015 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Thu Dec 17 13:51:30 2015 -0500

----------------------------------------------------------------------
 .../java/org/apache/airavata/client/samples/DataManagerSample.java | 2 --
 .../org/apache/airavata/data/manager/core/DataManagerImpl.java     | 2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/55f8e250/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/DataManagerSample.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/DataManagerSample.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/DataManagerSample.java
index fb820a1..c89dd01 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/DataManagerSample.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/DataManagerSample.java
@@ -65,8 +65,6 @@ public class DataManagerSample {
             String replicaId = client.copyDataResource(authzToken, resourceId, STORAGE_RESOURCE_ID,
"/var/www/portals/gateway-user-data/test-dest");
             System.out.println(replicaId);
 
-            GatewayResourceProfile gatewayResourceProfile = client.getGatewayResourceProfile(authzToken,
DEFAULT_GATEWAY);
-            System.out.println(gatewayResourceProfile.getGatewayID());
         } catch (Exception e) {
             logger.error("Error while connecting with server", e.getMessage());
             e.printStackTrace();

http://git-wip-us.apache.org/repos/asf/airavata/blob/55f8e250/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
index cdbf61f..cc14d05 100644
--- a/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
+++ b/modules/data-manager/data-manager-core/src/main/java/org/apache/airavata/data/manager/core/DataManagerImpl.java
@@ -362,6 +362,7 @@ public class DataManagerImpl implements DataManager {
         sourceJSch.addIdentity(UUID.randomUUID().toString(), sourceSshCredential.getPrivateKey().getBytes(),
                 sourceSshCredential.getPublicKey().getBytes(), sourceSshCredential.getPassphrase().getBytes());
         Session sourceSession = sourceJSch.getSession(sourceLoginUserName, sourceHostName,
sourcePort);
+        sourceSession.connect();
         String sourceFilePath = sourceReplica.getFileAbsolutePath();
 
         //Destination session
@@ -383,6 +384,7 @@ public class DataManagerImpl implements DataManager {
         destJSch.addIdentity(UUID.randomUUID().toString(), destSshCredential.getPrivateKey().getBytes(),
                 destSshCredential.getPublicKey().getBytes(), destSshCredential.getPassphrase().getBytes());
         Session destSession = destJSch.getSession(destLoginUserName, destHostName, destPort);
+        destSession.connect();
         if(!destinationParentPath.endsWith(File.separator))
             destinationParentPath += File.separator;
         String destFilePath = destinationParentPath + (new File(sourceFilePath).getName());


Mime
View raw message