airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject git commit: get gateway from serversettings
Date Thu, 10 Jul 2014 20:23:02 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 3c4c5840b -> eeefbc2b6


get gateway from serversettings


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

Branch: refs/heads/master
Commit: eeefbc2b6e3587a76b1d21f9b209c1bfbdde6fcc
Parents: 3c4c584
Author: Chathuri Wimalasena <kamalasini@gmail.com>
Authored: Thu Jul 10 16:22:58 2014 -0400
Committer: Chathuri Wimalasena <kamalasini@gmail.com>
Committed: Thu Jul 10 16:22:58 2014 -0400

----------------------------------------------------------------------
 .../orchestrator/cpi/impl/AbstractOrchestrator.java     | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/eeefbc2b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
index 7c5cb85..b86ec3b 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
@@ -34,6 +34,7 @@ import org.apache.airavata.client.api.AiravataAPI;
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.common.exception.AiravataConfigurationException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
+import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.orchestrator.core.OrchestratorConfiguration;
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
@@ -142,16 +143,13 @@ public abstract class AbstractOrchestrator implements Orchestrator {
 	
 	//get the registry URL and the credentials from the property file
     protected void setGatewayProperties() {
-        InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(OrchestratorConstants.AIRAVATA_PROPERTIES);
-        Properties properties = new Properties();
         try {
-            properties.load(inputStream);
-        } catch (IOException e) {
+            setAiravataUserName(ServerSettings.getSetting("system.user"));
+            setGatewayName(ServerSettings.getSetting("system.gateway"));
+            setRegistryURL(ServerSettings.getSetting("airavata.server.url"));
+        }  catch (ApplicationSettingsException e) {
             e.printStackTrace();
         }
-        setAiravataUserName(properties.getProperty("system.user"));
-        setGatewayName(properties.getProperty("system.gateway"));
-        setRegistryURL(properties.getProperty("airavata.server.url"));
     }
 
    private AiravataAPI getAiravataAPI() {


Mime
View raw message