You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sa...@apache.org on 2014/04/07 02:06:44 UTC

[3/3] git commit: https://issues.apache.org/jira/browse/AIRAVATA-1121

https://issues.apache.org/jira/browse/AIRAVATA-1121


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

Branch: refs/heads/master
Commit: ea57ef58e71946699ddf2dcf09b48f5f77b58738
Parents: 56eea3b
Author: Saminda Wijeratne <sa...@gmail.com>
Authored: Sun Apr 6 17:05:37 2014 -0700
Committer: Saminda Wijeratne <sa...@gmail.com>
Committed: Sun Apr 6 17:05:37 2014 -0700

----------------------------------------------------------------------
 .../airavata/api/server/AiravataAPIServer.java  |   1 -
 .../api/server/util/RegistryInitUtil.java       |   1 -
 modules/airavata-client/pom.xml                 |   4 +
 .../apache/airavata/client/AiravataClient.java  |  14 +-
 .../test/resources/airavata-client.properties   |  63 ----
 modules/commons/utils/pom.xml                   |   5 +
 .../airavata/common/utils/AiravataUtils.java    |   2 +-
 .../common/utils/ApplicationSettings.java       | 179 +++++++++---
 .../airavata/common/utils/ClientSettings.java   |   1 -
 .../airavata/common/utils/ServerSettings.java   |  17 ++
 .../airavata/common/utils/ServiceUtils.java     |   2 +-
 .../common/utils/ApplicationSettingsTest.java   |  10 +-
 .../test/resources/airavata-server.properties   | 283 ------------------
 .../main/resources/airavata-client.properties   |   5 +
 modules/gfac/gfac-core/pom.xml                  |   5 +
 .../org/apache/airavata/gfac/RequestData.java   |  43 +--
 .../context/security/GSISecurityContext.java    |  27 +-
 .../org/apache/airavata/gfac/cpi/GFacImpl.java  |   3 +-
 .../gfac/handler/GramDirectorySetupHandler.java |   5 +-
 .../gfac/handler/GridFTPInputHandler.java       |   3 +-
 .../gfac/handler/GridFTPOutputHandler.java      |   3 +-
 .../gfac/provider/impl/GramProvider.java        |  55 ++--
 .../test/resources/airavata-client.properties   |  66 -----
 .../test/resources/airavata-server.properties   | 231 ---------------
 modules/gfac/gfac-ec2/pom.xml                   |   6 +-
 .../test/resources/airavata-client.properties   |  67 -----
 .../test/resources/airavata-server.properties   | 231 ---------------
 modules/integration-tests/pom.xml               |   5 +
 .../airavata/integration/SimpleEchoIT.java      |  24 +-
 .../SingleAppIntegrationTestBase.java           |  19 +-
 .../test/resources/airavata-client.properties   | 288 ------------------
 .../test/resources/airavata-server.properties   | 280 ------------------
 .../airavata-orchestrator-service/pom.xml       |   5 +
 .../server/OrchestratorServerHandler.java       |  31 +-
 .../client/OrchestratorClientFactoryTest.java   |  16 +-
 .../test/resources/airavata-server.properties   | 283 ------------------
 modules/orchestrator/orchestrator-core/pom.xml  |   5 +
 .../core/utils/OrchestratorUtils.java           |  25 +-
 .../cpi/impl/AbstractOrchestrator.java          |   5 +-
 .../test/resources/airavata-client.properties   |  66 -----
 .../test/resources/airavata-server.properties   | 291 -------------------
 modules/registry/airavata-jpa-registry/pom.xml  |   5 +
 .../test/resources/airavata-client.properties   |  66 -----
 modules/registry/airavata-registry-test/pom.xml |   6 +-
 .../test/resources/airavata-client.properties   |  65 -----
 .../exception/RegistrySettingsException.java    |   4 +-
 .../org/apache/airavata/server/ServerMain.java  |   2 +
 .../wsmg/client/amqp/BroadcastSubscriber.java   |   3 +-
 .../wsmg/client/amqp/TopicSubscriber.java       |  13 +-
 .../commons/config/ConfigurationManager.java    |   2 +-
 modules/ws-messenger/messagebox/pom.xml         |   5 +
 .../test/resources/airavata-server.properties   |  51 ----
 modules/ws-messenger/messagebroker/pom.xml      |   6 +-
 .../test/resources/airavata-server.properties   | 230 ---------------
 modules/ws-messenger/pom.xml                    |   4 +-
 modules/xbaya-gui/pom.xml                       |   5 +
 .../test/resources/airavata-server.properties   | 247 ----------------
 pom.xml                                         |  10 +
 .../airavata/job/monitor/util/X509Helper.java   |  26 +-
 59 files changed, 401 insertions(+), 3024 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
index 2e2d5b1..7e0587a 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
@@ -31,7 +31,6 @@ import org.apache.airavata.common.utils.AiravataUtils;
 import org.apache.airavata.common.utils.IServer;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.thrift.server.TServer;
-import org.apache.thrift.server.TSimpleServer;
 import org.apache.thrift.server.TThreadPoolServer;
 import org.apache.thrift.transport.TServerSocket;
 import org.apache.thrift.transport.TServerTransport;

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java
index 70978b5..f20f441 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java
@@ -29,7 +29,6 @@ import java.sql.SQLException;
 
 import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
 import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.resources.GatewayResource;

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/airavata-client/pom.xml
----------------------------------------------------------------------
diff --git a/modules/airavata-client/pom.xml b/modules/airavata-client/pom.xml
index 37c1eca..40b1b09 100644
--- a/modules/airavata-client/pom.xml
+++ b/modules/airavata-client/pom.xml
@@ -56,6 +56,10 @@
 	<dependency>
             <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-client-configuration</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-jpa-registry</artifactId>
             <version>${project.version}</version>
         </dependency>
 	<dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java b/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
index 1fa4909..235c6e4 100644
--- a/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
+++ b/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
@@ -41,11 +41,17 @@ import org.apache.airavata.client.api.UserManager;
 import org.apache.airavata.client.api.WorkflowManager;
 import org.apache.airavata.client.api.builder.DescriptorBuilder;
 import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
-import org.apache.airavata.client.impl.*;
+import org.apache.airavata.client.impl.AiravataManagerImpl;
+import org.apache.airavata.client.impl.ApplicationManagerImpl;
+import org.apache.airavata.client.impl.CredentialStoreManagerImpl;
+import org.apache.airavata.client.impl.ExecutionManagerImpl;
+import org.apache.airavata.client.impl.PasswordCallBackImpl;
+import org.apache.airavata.client.impl.ProvenanceManagerImpl;
+import org.apache.airavata.client.impl.UserManagerImpl;
+import org.apache.airavata.client.impl.WorkflowManagerImpl;
 import org.apache.airavata.common.exception.AiravataConfigurationException;
 import org.apache.airavata.common.exception.ApplicationSettingsException;
-import org.apache.airavata.common.utils.ApplicationSettings;
-import org.apache.airavata.common.utils.ClientSettings;
+import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.common.utils.Version;
 import org.apache.airavata.registry.api.AiravataRegistry2;
 import org.apache.airavata.registry.api.AiravataRegistryFactory;
@@ -173,7 +179,7 @@ public class AiravataClient extends Observable implements AiravataAPI {
     private String getRegistryWebServiceWSDLUrl() throws AiravataAPIInvocationException {
         String registryUrl = null;
         try {
-            registryUrl = ApplicationSettings.getAbsoluteSetting("registry.service.wsdl");
+            registryUrl = ServerSettings.getSetting("registry.service.wsdl");
         } catch (ApplicationSettingsException e) {
             String msg = "Configuration registry.service.wsdl is not specified in the configuration file";
             log.warn(msg);

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/airavata-client/src/test/resources/airavata-client.properties
----------------------------------------------------------------------
diff --git a/modules/airavata-client/src/test/resources/airavata-client.properties b/modules/airavata-client/src/test/resources/airavata-client.properties
deleted file mode 100644
index c34c322..0000000
--- a/modules/airavata-client/src/test/resources/airavata-client.properties
+++ /dev/null
@@ -1,63 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-###########################################################################
-#
-#  This properties file provides configuration for Airavata Clients: 
-#  XBaya and Airavata API
-#
-###########################################################################
-
-###---------------------------REGISTRY API IMPLEMENTATION---------------------------###
-
-#class.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-class.registry.accessor=org.apache.airavata.rest.client.RegistryClient
-
-###---------------------REGISTRY API IMPLEMENTATION - CUSTOM SETTINGS----------------------###
-
-#for mysql [AiravataJPARegistry]
-#registry.jdbc.driver=com.mysql.jdbc.Driver
-#registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
-
-#for derby [AiravataJPARegistry]
-registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
-registry.jdbc.user=airavata
-registry.jdbc.password=airavata
-start.derby.server.mode=true
-
-default.registry.user=admin
-default.registry.password=admin
-default.registry.gateway=default
-
-trust.store=aiaravata.jks
-trust.store.password=airavata
-
-#for rest [RegistryClient]
-#registry.jdbc.url=http://localhost:9080/airavata-services
-
-#user defined registry accessor classes
-#class.provenance.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.configuration.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.descriptor.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.project.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.user.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.published.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/commons/utils/pom.xml
----------------------------------------------------------------------
diff --git a/modules/commons/utils/pom.xml b/modules/commons/utils/pom.xml
index 7add7eb..160017d 100644
--- a/modules/commons/utils/pom.xml
+++ b/modules/commons/utils/pom.xml
@@ -107,6 +107,11 @@
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
+	<dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-server-configuration</artifactId>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>jcl-over-slf4j</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AiravataUtils.java
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AiravataUtils.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AiravataUtils.java
index 45d2b8f..6c29313 100644
--- a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AiravataUtils.java
+++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AiravataUtils.java
@@ -34,7 +34,7 @@ public class AiravataUtils {
 		if (System.getProperties().containsKey(EXECUTION_MODE)) {
 			return ExecutionMode.valueOf(System.getProperty(EXECUTION_MODE));
 		}else{
-			return null;
+			return ExecutionMode.CLIENT;
 		}
 	}
 	

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
index ea3b1ef..39a0455 100644
--- a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
+++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
@@ -40,11 +40,11 @@ import org.apache.airavata.common.exception.UnspecifiedApplicationSettingsExcept
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public abstract class ApplicationSettings {
+public class ApplicationSettings {
     public static final String SERVER_PROPERTIES="airavata-server.properties";
     public static final String CLIENT_PROPERTIES="airavata-client.properties";
-	private static Properties properties = new Properties();
-    private static Exception propertyLoadException;
+	protected Properties properties = new Properties();
+    private Exception propertyLoadException;
 
 
     protected static final String TRUST_STORE_PATH="trust.store";
@@ -55,15 +55,17 @@ public abstract class ApplicationSettings {
     private final static Logger logger = LoggerFactory.getLogger(ApplicationSettings.class);
 
     private static final String SHUTDOWN_STATEGY_STRING="shutdown.strategy";
+    
+    protected static ApplicationSettings INSTANCE;
     public static enum ShutdownStrategy{
     	NONE,
     	SELF_TERMINATE
     }
-    static{
+    {
     	loadProperties();
     }
 
-	private static void loadProperties() {
+	private void loadProperties() {
 		URL url = getPropertyFileURL();
         try {
             properties.load(url.openStream());
@@ -72,7 +74,7 @@ public abstract class ApplicationSettings {
         }
 	}
 
-	private static URL getPropertyFileURL() {
+	protected URL getPropertyFileURL() {
 		URL url;
 		if (AiravataUtils.isClient()){
             url=ApplicationSettings.class.getClassLoader().getResource(CLIENT_PROPERTIES);
@@ -82,7 +84,18 @@ public abstract class ApplicationSettings {
 		return url;
 	}
 	
-	private static void saveProperties() throws ApplicationSettingsStoreException{
+	protected static ApplicationSettings getInstance(){
+		if (INSTANCE==null){
+			INSTANCE=new ApplicationSettings();
+		}
+		return INSTANCE;
+	}
+	
+	protected static void setInstance(ApplicationSettings settingsInstance){
+		INSTANCE=settingsInstance;
+	}
+	
+	private void saveProperties() throws ApplicationSettingsStoreException{
 		URL url = getPropertyFileURL();
 		if (url.getProtocol().equalsIgnoreCase("file")){
 			try {
@@ -95,7 +108,7 @@ public abstract class ApplicationSettings {
 		}
 	}
 	
-    private static void validateSuccessfulPropertyFileLoad() throws ApplicationSettingsException{
+    private void validateSuccessfulPropertyFileLoad() throws ApplicationSettingsException{
     	if (propertyLoadException!=null){
     		throw new ApplicationSettingsLoadException(propertyLoadException);
     	}
@@ -112,7 +125,7 @@ public abstract class ApplicationSettings {
      * @throws ApplicationSettingsException If an error occurred while reading configurations.
      * @deprecated use #getSetting(String) instead
      */
-    public static String getAbsoluteSetting(String key) throws ApplicationSettingsException {
+    public String getAbsoluteSetting(String key) throws ApplicationSettingsException {
 
         String configurationValueWithVariables = ApplicationSettings.getSetting(key);
 
@@ -147,27 +160,24 @@ public abstract class ApplicationSettings {
         return matches;
     }
     
-    public static String getSetting(String key) throws ApplicationSettingsException{
+    public String getSettingImpl(String key) throws ApplicationSettingsException{
     	validateSuccessfulPropertyFileLoad();
     	if (properties.containsKey(key)){
-    		return deriveAbsoluteValue(properties.getProperty(key));
+    		return deriveAbsoluteValueImpl(properties.getProperty(key));
     	}
     	throw new UnspecifiedApplicationSettingsException(key);
     }
     
-    public static String getSetting(String key, String defaultValue){
+    public String getSettingImpl(String key, String defaultValue){
     	try {
-			validateSuccessfulPropertyFileLoad();
-			if (properties.containsKey(key)){
-				return deriveAbsoluteValue(properties.getProperty(key));
-			}
+    		return getSettingImpl(key);
 		} catch (ApplicationSettingsException e) {
 			//we'll ignore this error since a default value is provided
 		}
 		return defaultValue;
     }
 
-	private static String deriveAbsoluteValue(String property) {
+	private String deriveAbsoluteValueImpl(String property){
 		if (property!=null){
 			Map<Integer, String> containedParameters = StringUtil.getContainedParameters(property);
 			List<String> parametersAlreadyProcessed=new ArrayList<String>();
@@ -183,16 +193,123 @@ public abstract class ApplicationSettings {
 		return property;
 	}
     
-    public static void setSetting(String key, String value) throws ApplicationSettingsException{
+    public void setSettingImpl(String key, String value) throws ApplicationSettingsException{
     	properties.setProperty(key, value);
     	saveProperties();
     }
     
-    public static boolean isSettingDefined(String key) throws ApplicationSettingsException{
+    public boolean isSettingDefinedImpl(String key) throws ApplicationSettingsException{
     	validateSuccessfulPropertyFileLoad();
     	return properties.containsKey(key);
     }
 
+    public String getTrustStorePathImpl() throws ApplicationSettingsException {
+        return getSetting(TRUST_STORE_PATH);
+    }
+
+    public String getTrustStorePasswordImpl() throws ApplicationSettingsException {
+        return getSetting(TRUST_STORE_PASSWORD);
+    }
+
+    public String getCredentialStoreKeyStorePathImpl() throws ApplicationSettingsException {
+        return getSetting("credential.store.keystore.url");
+    }
+
+    public String getCredentialStoreKeyAliasImpl() throws ApplicationSettingsException {
+        return getSetting("credential.store.keystore.alias");
+    }
+
+    public String getCredentialStoreKeyStorePasswordImpl() throws ApplicationSettingsException {
+        return getSetting("credential.store.keystore.password");
+    }
+
+    public String getCredentialStoreNotifierEnabledImpl() throws ApplicationSettingsException {
+        return getSetting("notifier.enabled");
+    }
+
+    public String getCredentialStoreNotifierDurationImpl() throws ApplicationSettingsException {
+        return getSetting("notifier.duration");
+    }
+
+    public String getCredentialStoreEmailServerImpl() throws ApplicationSettingsException {
+        return getSetting("email.server");
+    }
+
+    public String getCredentialStoreEmailServerPortImpl() throws ApplicationSettingsException {
+        return getSetting("email.server.port");
+    }
+
+    public String getCredentialStoreEmailUserImpl() throws ApplicationSettingsException {
+        return getSetting("email.user");
+    }
+
+    public String getCredentialStoreEmailPasswordImpl() throws ApplicationSettingsException {
+        return getSetting("email.password");
+    }
+
+    public String getCredentialStoreEmailSSLConnectImpl() throws ApplicationSettingsException {
+        return getSetting("email.ssl");
+    }
+
+    public String getCredentialStoreEmailFromEmailImpl() throws ApplicationSettingsException {
+        return getSetting("email.from");
+    }
+
+    /**
+     * @deprecated use {{@link #getSetting(String)}}
+     * @return
+     */
+    public Properties getPropertiesImpl() {
+        return properties;
+    }
+    
+    public void mergeSettingsImpl(Map<String,String> props){
+    	properties.putAll(props);
+    }
+    
+    public void mergeSettingsImpl(InputStream stream) throws IOException{
+    	Properties tmpProp = new Properties();
+    	tmpProp.load(stream);
+    	properties.putAll(tmpProp);
+    }
+    
+    public void mergeSettingsCommandLineArgsImpl(String[] args){
+    	properties.putAll(StringUtil.parseCommandLineOptions(args));
+    }
+ 
+    public ShutdownStrategy getShutdownStrategyImpl() throws Exception{
+    	String strategy = null;
+    	try {
+			strategy = getSetting(SHUTDOWN_STATEGY_STRING, ShutdownStrategy.SELF_TERMINATE.toString());
+			return ShutdownStrategy.valueOf(strategy);
+		} catch (Exception e) {
+			//if the string mentioned in config is invalid
+			throw new Exception("Invalid shutdown strategy configured : "+strategy);
+		}
+    }
+    
+    /*
+     * Static methods which will be used by the users
+     */
+    
+    public static String getSetting(String key) throws ApplicationSettingsException{
+    	return getInstance().getSettingImpl(key);
+    }
+    
+    public static String getSetting(String key, String defaultValue){
+    	return getInstance().getSettingImpl(key,defaultValue);
+
+    }
+    
+    public static void setSetting(String key, String value) throws ApplicationSettingsException{
+    	getInstance().properties.setProperty(key, value);
+    	getInstance().saveProperties();
+    }
+    
+    public static boolean isSettingDefined(String key) throws ApplicationSettingsException{
+    	return getInstance().properties.containsKey(key);
+    }
+
     public static String getTrustStorePath() throws ApplicationSettingsException {
         return getSetting(TRUST_STORE_PATH);
     }
@@ -252,33 +369,25 @@ public abstract class ApplicationSettings {
     /**
      * @deprecated use {{@link #getSetting(String)}}
      * @return
+     * @throws ApplicationSettingsException 
      */
-    public static Properties getProperties() {
-        return properties;
+    public static Properties getProperties() throws ApplicationSettingsException {
+        return getInstance().properties;
     }
     
-    public static void mergeSettings(Map<String,String> props){
-    	properties.putAll(props);
+    public static void mergeSettings(Map<String,String> props) {
+    	getInstance().mergeSettingsImpl(props);
     }
     
     public static void mergeSettings(InputStream stream) throws IOException{
-    	Properties tmpProp = new Properties();
-    	tmpProp.load(stream);
-    	properties.putAll(tmpProp);
+    	getInstance().mergeSettingsImpl(stream);
     }
     
     public static void mergeSettingsCommandLineArgs(String[] args){
-    	properties.putAll(StringUtil.parseCommandLineOptions(args));
+    	getInstance().mergeSettingsCommandLineArgsImpl(args);
     }
  
     public static ShutdownStrategy getShutdownStrategy() throws Exception{
-    	String strategy = null;
-    	try {
-			strategy = getSetting(SHUTDOWN_STATEGY_STRING, ShutdownStrategy.SELF_TERMINATE.toString());
-			return ShutdownStrategy.valueOf(strategy);
-		} catch (Exception e) {
-			//if the string mentioned in config is invalid
-			throw new Exception("Invalid shutdown strategy configured : "+strategy);
-		}
+    	return getInstance().getShutdownStrategyImpl();
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ClientSettings.java
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ClientSettings.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ClientSettings.java
index 739867e..5373772 100644
--- a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ClientSettings.java
+++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ClientSettings.java
@@ -21,7 +21,6 @@
 
 package org.apache.airavata.common.utils;
 
-import org.apache.airavata.common.exception.ApplicationSettingsException;
 
 public class ClientSettings extends ApplicationSettings {
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
index 8685e35..cbb7ccc 100644
--- a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
+++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
@@ -41,6 +41,11 @@ public class ServerSettings extends ApplicationSettings{
     private static final String SYSTEM_USER="system.user";
     private static final String SYSTEM_USER_PASSWORD="system.password";
     private static final String SYSTEM_USER_GATEWAY="system.gateway";
+    
+    private static final String DEFAULT_USER="default.registry.user";
+    private static final String DEFAULT_USER_PASSWORD="default.registry.password";
+    private static final String DEFAULT_USER_GATEWAY="default.registry.gateway";
+    
     private static final String TOMCAT_PORT = "port";
     private static final String SERVER_CONTEXT_ROOT="server.context-root";
     private static String tomcatPort=null;
@@ -58,6 +63,18 @@ public class ServerSettings extends ApplicationSettings{
     private static final String HOST_SCHEDULER = "host.scheduler";
     private static boolean stopAllThreads = false;
 
+    public static String getDefaultUser() throws ApplicationSettingsException{
+    	return getSetting(DEFAULT_USER);
+    }
+    
+    public static String getDefaultUserPassword() throws ApplicationSettingsException{
+    	return getSetting(DEFAULT_USER_PASSWORD);
+    }
+    
+    public static String getDefaultUserGateway() throws ApplicationSettingsException{
+    	return getSetting(DEFAULT_USER_GATEWAY);
+    }
+    
     public static String getSystemUser() throws ApplicationSettingsException{
     	return getSetting(SYSTEM_USER);
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServiceUtils.java
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServiceUtils.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServiceUtils.java
index 9966794..91048db 100644
--- a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServiceUtils.java
+++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServiceUtils.java
@@ -38,7 +38,7 @@ public class ServiceUtils {
     public static final String PORT = "port";
 
 	public static String generateServiceURLFromConfigurationContext(
-			ConfigurationContext context, String serviceName) throws IOException {
+			ConfigurationContext context, String serviceName) throws IOException, ApplicationSettingsException {
 //		URL url = ServiceUtils.class.getClassLoader()
 //				.getResource(REPOSITORY_PROPERTIES);
 		 String localAddress = null;

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/commons/utils/src/test/java/org/apache/airavata/common/utils/ApplicationSettingsTest.java
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/test/java/org/apache/airavata/common/utils/ApplicationSettingsTest.java b/modules/commons/utils/src/test/java/org/apache/airavata/common/utils/ApplicationSettingsTest.java
index 69f059b..5cc3e00 100644
--- a/modules/commons/utils/src/test/java/org/apache/airavata/common/utils/ApplicationSettingsTest.java
+++ b/modules/commons/utils/src/test/java/org/apache/airavata/common/utils/ApplicationSettingsTest.java
@@ -23,12 +23,6 @@ package org.apache.airavata.common.utils;
 
 import junit.framework.Assert;
 import junit.framework.TestCase;
-import org.apache.airavata.common.exception.ApplicationSettingsException;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 
 /**
  * User: AmilaJ (amilaj@apache.org)
@@ -40,7 +34,7 @@ public class ApplicationSettingsTest extends TestCase {
     public void testGetAbsoluteSetting() throws Exception {
 
         System.setProperty(AiravataUtils.EXECUTION_MODE, "SERVER");
-        String url = ApplicationSettings.getAbsoluteSetting("registry.service.wsdl");
+        String url = ServerSettings.getSetting("registry.service.wsdl");
         Assert.assertEquals("http://localhost:8080/airavata-server/services/RegistryService?wsdl", url);
 
     }
@@ -48,7 +42,7 @@ public class ApplicationSettingsTest extends TestCase {
     public void testGetAbsoluteSettingWithSpecialCharacters() throws Exception {
 
         System.setProperty(AiravataUtils.EXECUTION_MODE, "SERVER");
-        String url = ApplicationSettings.getAbsoluteSetting("system.user");
+        String url = ServerSettings.getSetting("system.user");
         Assert.assertEquals("admin", url);
 
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/commons/utils/src/test/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/commons/utils/src/test/resources/airavata-server.properties b/modules/commons/utils/src/test/resources/airavata-server.properties
deleted file mode 100644
index 5557a10..0000000
--- a/modules/commons/utils/src/test/resources/airavata-server.properties
+++ /dev/null
@@ -1,283 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-###########################################################################
-#
-#  This properties file provides configuration for all Airavata Services:
-#  Registry, Workflow Interpreter, GFac, Message Broker, Message Box
-#
-###########################################################################
-
-###########################################################################
-# Airavata Embedded-Tomcat Server Configuration
-###########################################################################
-# By default, tomcat runs on port 80. If the port is changed, it will be
-#  have to be specified with port properties. This will be picked up by
-#  the registry service to register the service end-points.
-
-port=8080
-
-# Axis2 server automatically picks up IP address from axis configuration,
-#  but some DHCP enables machines do not report correct ip addresses,
-#  in which case, the IP address can be manually specified.
-
-#ip=192.2.33.12
-
-
-#This property will enable https and stops http, during the url registration, https urls will be stored and
-# http urls will not get registered, because currently airavata supports only one url for each service
-#enable.https=false
-#system properties used by services to register service URLs
-system.gateway=default
-system.user=admin
-system.password=admin
-airavata.server.url=http://localhost:8080/airavata/services/registry
-
-###########################################################################
-# Airavata Registry Configuration
-###########################################################################
-#for derby [AiravataJPARegistry]
-registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
-# MySql database configuration
-#registry.jdbc.driver=com.mysql.jdbc.Driver
-#registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
-registry.jdbc.user=airavata
-registry.jdbc.password=airavata
-start.derby.server.mode=true
-validationQuery=SELECT 1 from CONFIGURATION
-jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
-# Properties to setup registry service
-default.registry.user=admin
-default.registry.password=admin
-default.registry.password.hash.method=SHA
-default.registry.gateway=default
-#for rest [RegistryClient]
-#registry.jdbc.url=http://localhost:9080/airavata-services
-
-#user defined registry accessor classes
-#class.provenance.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.configuration.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.descriptor.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.project.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.user.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.published.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-
-############################################################    ###############
-# Airavata Workflow Interpreter Configurations
-###########################################################################
-
-runInThread=true
-provenance=true
-provenanceWriterThreadPoolSize=20
-gfac.embedded=true
-
-#
-# Security Configuration used by Airavata Generic Factory Service
-#  to interact with Computational Resources.
-#
-
-###########################################################################
-# Airavata GFac MyProxy GSI credentials to access Grid Resources.
-###########################################################################
-
-myproxy.server=myproxy.teragrid.org
-myproxy.user=ogce
-myproxy.pass=
-myproxy.life=3600
-# XSEDE Trusted certificates can be downloaded from https://software.xsede.org/security/xsede-certs.tar.gz
-trusted.cert.location=/Users/lahirugunathilake/Downloads/certificates
-# SSH PKI key pair or ssh password can be used SSH based authentication is used.
-# if user specify both password authentication gets the higher preference
-
-################# ---------- For ssh key pair authentication ------------------- ################
-#public.ssh.key=/path to public key for ssh
-#ssh.username=username for ssh connection
-#private.ssh.key=/path to private key file for ssh
-#ssh.keypass=passphrase for the private key
-
-
-################# ---------- For ssh key pair authentication ------------------- ################
-#ssh.username=username for ssh connection
-#ssh.password=Password for ssh connection
-
-
-
-###########################################################################
-# Airavata Message Broker Basic Configurations.
-#  the Advanced section provides detailed custom configuration properties.
-###########################################################################
-
-# Default derby database configuration
-broker.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
-broker.jdbc.url=jdbc:derby:wsmg;create=true;user=airavata;password=airavata
-
-# Note: This database will only be used  if 'broker.storage.type=persistent'
-#       is set in advanced properties below.
-# MySql database configuration
-#broker.jdbc.driver=com.mysql.jdbc.Driver
-#broker.jdbc.url=jdbc:mysql://localhost:3306/wsmg?user=airavata&password=airavata
-
-###########################################################################
-# Airavata Message Box Basic Configurations,
-#  the Advanced section provides detailed custom configuration properties.
-###########################################################################
-
-# Default derby database
-msgBox.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
-msgBox.jdbc.url=jdbc:derby:wsmg;create=true;user=airavata;password=airavata
-
-# MySql database configuration
-#msgBox.jdbc.driver=com.mysql.jdbc.Driver
-#msgBox.jdbc.url=jdbc:mysql://localhost:3306/wsmg?user=airavata&password=airavata
-
-###########################################################################
-# Advance configuration to change service implementations
-###########################################################################
-
-#Update the server context root path if airavata server is deployed under a different context root other than axis2
-server.context-root=airavata-server
-
-#
-# Class which implemented HostScheduler interface. It will determine the which host to submit the request
-#
-host.scheduler=org.apache.airavata.gfac.scheduler.impl.SimpleHostScheduler
-
-#
-# Data Service Plugins classes
-#
-datachain.classes= org.apache.airavata.core.gfac.extension.data.RegistryDataService
-
-#
-# Pre execution Plugins classes. For example, GridFTP Input Staging
-#
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.GridFtpInputStaging
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.HttpInputStaging
-
-#
-# Post execution Plugins classes. For example, GridFTP Output Staging
-#
-postchain.classes= org.apache.airavata.core.gfac.extension.post.GridFtpOutputStaging
-postchain.classes= org.apache.airavata.core.gfac.extension.post.OutputRegister
-
-#
-# Advanced Message Broker Configurations
-#
-
-#socket time out in milliseconds for sending messages. (defaults is 20000)
-broker.socket.timeout=60000
-
-broker.storage.type=persistent
-#broker.storage.type=memory
-
-#specifies wether delivery component should be started or not.
-broker.start.delivery.thread=true
-
-#fixed thread pool based delivery
-#broker.delivery.method=pcrew
-
-#dynamic thread pool based delivery
-#broker.delivery.method=parallel
-
-#single thread delivery
-broker.delivery.method=serial
-
-#number of message delivery failures before a url become black listed (default is 2)
-#broker.msg.delivery.retries=2
-
-#time period (in seconds) a url will be kept blacklisted (default is 5 seconds)
-#consumer.expiration.time.gap=5
-
-#maximum number of messages to be send to a one consumer/url at time.
-#applicable if 'broker.delivery.method' is 'pcrew' . (default is 10)
-
-#sending.batch.size=10
-
-#size of the thread pool. only applicable if 'broker.delivery.method' is 'pcrew'. (default is 4)
-#sending.thread.pool.size=4
-
-#
-# Advanced Message Box Configurations
-#
-msgBox.usedatabase=true
-messagePreservationDays=2
-messagePreservationHours=0
-messagePreservationMinutes=0
-messagePerservationIntervalDays=0
-messagePerservationIntervalHours=1
-messagePerservationIntervalMinutes=0
-
-###---------------------------REGISTRY API IMPLEMENTATION---------------------------###
-
-class.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.registry.accessor=org.apache.airavata.rest.client.RegistryClient
-
-###########################################################################
-# AMQP Notification Configuration
-###########################################################################
-amqp.notification.enable=1
-
-amqp.broker.host=localhost
-amqp.broker.port=5672
-amqp.broker.username=guest
-amqp.broker.password=guest
-
-amqp.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPSenderImpl
-amqp.topic.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPTopicSenderImpl
-amqp.broadcast.sender=org.apache.airavata.wsmg.client.amqp.rabbitmq.AMQPBroadcastSenderImpl
-
-###---------------------------Computational Middleware Configurations---------------------------###
-
-#enable.application.job.status.history=true
-#http://localhost:8080/axis2/services/RegistryService?wsdl
-registry.service.wsdl=http://localhost:${port}/${server.context-root}/services/RegistryService?wsdl
-
-# If false, disables two phase commit when submitting jobs
-TwoPhase=true
-
-
-###---------------------------Monitoring module Configurations---------------------------###
-#This will be the primary monitoring tool which runs in airavata, in future there will be multiple monitoring
-#mechanisms and one would be able to start a monitor
-monitors=org.apache.airavata.job.monitor.impl.pull.qstat.QstatMonitor,org.apache.airavata.job.monitor.impl.LocalJobMonitor
-#,org.apache.airavata.job.monitor.impl.push.amqp.AMQPMonitor
-#This is the amqp related configuration and this lists down the Rabbitmq host, this is an xsede specific configuration
-amqp.hosts=info1.dyn.teragrid.org,info2.dyn.teragrid.org
-proxy.file.path=/Users/lahirugunathilake/Downloads/x509up_u503876
-connection.name=xsede_private
-
-
-###---------------------------Orchestrator module Configurations---------------------------###
-job.submitter=org.apache.airavata.orchestrator.core.impl.EmbeddedGFACJobSubmitter
-job.validator=org.apache.airavata.orchestrator.core.validator.impl.SimpleAppDataValidator
-submitter.interval=10000
-threadpool.size=10
-start.submitter=true
-embedded.mode=true
-enable.validation=false
-orchestrator=org.apache.airavata.orchestrator.server.OrchestratorServer
-
-###---------------------------API Server module Configurations---------------------------###
-apiserver=org.apache.airavata.api.server.AiravataAPIServer
-
-###---------------------------Airavata Server Configurations---------------------------###
-servers=apiserver,orchestrator
-#shutdown.trategy=NONE
-shutdown.trategy=SELF_TERMINATE 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/configuration/client/src/main/resources/airavata-client.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/client/src/main/resources/airavata-client.properties b/modules/configuration/client/src/main/resources/airavata-client.properties
index c275ded..87d7b6f 100644
--- a/modules/configuration/client/src/main/resources/airavata-client.properties
+++ b/modules/configuration/client/src/main/resources/airavata-client.properties
@@ -74,4 +74,9 @@ xbaya.default.gateway=default
 
 
 
+###########################################################################
+# Airavata Thrift Server configurations
+###########################################################################
+thrift.server.host=localhost
+thrift.server.port=8930
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/gfac/gfac-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/pom.xml b/modules/gfac/gfac-core/pom.xml
index 954fd22..da47995 100644
--- a/modules/gfac/gfac-core/pom.xml
+++ b/modules/gfac/gfac-core/pom.xml
@@ -154,6 +154,11 @@
             <artifactId>slf4j-log4j12</artifactId>
             <scope>test</scope>
         </dependency>
+	<dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-client-configuration</artifactId>
+            <scope>test</scope>
+        </dependency>
         <!-- Unicore dependencies -->
         <dependency>
             <groupId>eu.unicore</groupId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java
index 7c2c175..9f45ce6 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java
@@ -27,10 +27,9 @@ package org.apache.airavata.gfac;
  * Time: 3:28 PM
  */
 
+import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 
-import java.util.Properties;
-
 /**
  * Encapsulates GFac specific data that are coming in the request.
  */
@@ -87,13 +86,10 @@ public class RequestData {
         this.gatewayId = gatewayId;
     }
 
-    public String getMyProxyServerUrl() {
-
+    public String getMyProxyServerUrl() throws ApplicationSettingsException {
         if (myProxyServerUrl == null) {
-            Properties properties = ServerSettings.getProperties();
-            myProxyServerUrl = properties.getProperty(Constants.MYPROXY_SERVER);
+            myProxyServerUrl = ServerSettings.getSetting(Constants.MYPROXY_SERVER);
         }
-
         return myProxyServerUrl;
     }
 
@@ -104,14 +100,8 @@ public class RequestData {
     public int getMyProxyPort() {
 
         if (myProxyPort == 0) {
-            Properties properties = ServerSettings.getProperties();
-            String sPort = properties.getProperty(Constants.MYPROXY_SERVER_PORT);
-
-            if (sPort != null) {
-                myProxyPort = Integer.parseInt(sPort);
-            } else {
-                myProxyPort = DEFAULT_MY_PROXY_PORT;
-            }
+            String sPort = ServerSettings.getSetting(Constants.MYPROXY_SERVER_PORT, Integer.toString(DEFAULT_MY_PROXY_PORT));
+            myProxyPort = Integer.parseInt(sPort);
         }
 
         return myProxyPort;
@@ -121,10 +111,9 @@ public class RequestData {
         this.myProxyPort = myProxyPort;
     }
 
-    public String getMyProxyUserName() {
+    public String getMyProxyUserName() throws ApplicationSettingsException {
         if (myProxyUserName == null) {
-            Properties properties = ServerSettings.getProperties();
-            myProxyUserName = properties.getProperty(Constants.MYPROXY_USER);
+            myProxyUserName = ServerSettings.getSetting(Constants.MYPROXY_USER);
         }
 
         return myProxyUserName;
@@ -134,27 +123,19 @@ public class RequestData {
         this.myProxyUserName = myProxyUserName;
     }
 
-    public String getMyProxyPassword() {
+    public String getMyProxyPassword() throws ApplicationSettingsException {
 
         if (myProxyPassword == null) {
-            Properties properties = ServerSettings.getProperties();
-            myProxyPassword = properties.getProperty(Constants.MYPROXY_PASS);
+            myProxyPassword = ServerSettings.getSetting(Constants.MYPROXY_PASS);
         }
 
         return myProxyPassword;
     }
 
     public int getMyProxyLifeTime() {
-
-        Properties properties = ServerSettings.getProperties();
-        String life = properties.getProperty(Constants.MYPROXY_LIFE);
-
-        if (life == null) {
-            return myProxyLifeTime;
-        } else {
-            myProxyLifeTime = Integer.parseInt(life);
-            return myProxyLifeTime;
-        }
+        String life = ServerSettings.getSetting(Constants.MYPROXY_LIFE,Integer.toString(myProxyLifeTime));
+        myProxyLifeTime = Integer.parseInt(life);
+        return myProxyLifeTime;
     }
 
     public void setMyProxyLifeTime(int myProxyLifeTime) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/GSISecurityContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/GSISecurityContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/GSISecurityContext.java
index c0067f4..f939456 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/GSISecurityContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/GSISecurityContext.java
@@ -25,6 +25,7 @@ import java.security.Security;
 import java.security.cert.X509Certificate;
 import java.util.Properties;
 
+import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.credential.store.credential.Credential;
 import org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential;
@@ -66,7 +67,11 @@ public class GSISecurityContext extends AbstractSecurityContext {
     // Set trusted cert path and add provider
     static {
         Security.addProvider(new GlobusProvider());
-        setUpTrustedCertificatePath();
+        try {
+			setUpTrustedCertificatePath();
+		} catch (ApplicationSettingsException e) {
+			log.error(e.getLocalizedMessage(), e);
+		}
     }
 
     public static void setUpTrustedCertificatePath(String trustedCertificatePath) {
@@ -82,10 +87,9 @@ public class GSISecurityContext extends AbstractSecurityContext {
         }
     }
 
-    private static void setUpTrustedCertificatePath() {
+    private static void setUpTrustedCertificatePath() throws ApplicationSettingsException {
 
-        Properties properties = ServerSettings.getProperties();
-        String trustedCertificatePath  = properties.getProperty(Constants.TRUSTED_CERT_LOCATION);
+        String trustedCertificatePath  = ServerSettings.getSetting(Constants.TRUSTED_CERT_LOCATION);
 
         setUpTrustedCertificatePath(trustedCertificatePath);
     }
@@ -118,8 +122,9 @@ public class GSISecurityContext extends AbstractSecurityContext {
      * remaining life time is less than CREDENTIAL_RENEWING_THRESH_HOLD, then renew credentials.
      * @return GSSCredentials to be used.
      * @throws GFacException If an error occurred while creating credentials.
+     * @throws ApplicationSettingsException 
      */
-    public GSSCredential getGssCredentials() throws GFacException {
+    public GSSCredential getGssCredentials() throws GFacException, ApplicationSettingsException {
 
         if (gssCredentials == null) {
 
@@ -157,8 +162,9 @@ public class GSISecurityContext extends AbstractSecurityContext {
      * use user name and password to renew credentials.
      * @return Renewed credentials.
      * @throws GFacException If an error occurred while renewing credentials.
+     * @throws ApplicationSettingsException 
      */
-    public GSSCredential renewCredentials() throws GFacException {
+    public GSSCredential renewCredentials() throws GFacException, ApplicationSettingsException {
 
         // First try to renew credentials as a trusted renewer
         try {
@@ -217,8 +223,9 @@ public class GSISecurityContext extends AbstractSecurityContext {
      * Gets the default proxy certificate.
      * @return Default my proxy credentials.
      * @throws GFacException If an error occurred while retrieving credentials.
+     * @throws ApplicationSettingsException 
      */
-    public GSSCredential getDefaultCredentials() throws GFacException{
+    public GSSCredential getDefaultCredentials() throws GFacException, ApplicationSettingsException{
         MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
         try {
             return myproxy.get(getRequestData().getMyProxyUserName(), getRequestData().getMyProxyPassword(),
@@ -232,8 +239,9 @@ public class GSISecurityContext extends AbstractSecurityContext {
      * Gets a new proxy certificate given current credentials.
      * @return The short lived GSSCredentials
      * @throws GFacException If an error is occurred while retrieving credentials.
+     * @throws ApplicationSettingsException 
      */
-    public GSSCredential getProxyCredentials() throws GFacException {
+    public GSSCredential getProxyCredentials() throws GFacException, ApplicationSettingsException {
 
         MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
         try {
@@ -256,8 +264,9 @@ public class GSISecurityContext extends AbstractSecurityContext {
      * > myproxy-init -A --cert /tmp/x509up_u501 --key /tmp/x509up_u501 -l ogce -s myproxy.teragrid.org
      * @return  Renewed credentials.
      * @throws GFacException If an error occurred while renewing credentials.
+     * @throws ApplicationSettingsException 
      */
-    public GSSCredential renewCredentialsAsATrustedHost() throws GFacException {
+    public GSSCredential renewCredentialsAsATrustedHost() throws GFacException, ApplicationSettingsException {
         MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
 
         GetParams getParams = new GetParams();

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
index 7de9d5f..c78c164 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
@@ -21,6 +21,7 @@
 package org.apache.airavata.gfac.cpi;
 
 import org.apache.airavata.client.api.AiravataAPI;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.commons.gfac.type.HostDescription;
@@ -339,7 +340,7 @@ public class GFacImpl implements GFac {
     }
 
     private void addSecurityContext(HostDescription registeredHost, Properties configurationProperties,
-                                    JobExecutionContext jobExecutionContext) throws GFacException {
+                                    JobExecutionContext jobExecutionContext) throws GFacException, ApplicationSettingsException {
         RequestData requestData;
         if (registeredHost.getType() instanceof GlobusHostType || registeredHost.getType() instanceof UnicoreHostType
                 || registeredHost.getType() instanceof GsisshHostType) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GramDirectorySetupHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GramDirectorySetupHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GramDirectorySetupHandler.java
index 2088fe2..83af422 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GramDirectorySetupHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GramDirectorySetupHandler.java
@@ -24,6 +24,7 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.Map;
 
+import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.context.JobExecutionContext;
@@ -123,7 +124,9 @@ public class GramDirectorySetupHandler extends  AbstractHandler {
             }
         } catch (SecurityException e) {
             throw new GFacHandlerException(e.getMessage(), e);
-        }
+        } catch (ApplicationSettingsException e1) {
+        	throw new GFacHandlerException(e1.getMessage(), e1);
+		}
     }
 
     public void initProperties(Map<String, String> properties) throws GFacHandlerException, GFacException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPInputHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPInputHandler.java
index 67562ec..6876d59 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPInputHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPInputHandler.java
@@ -32,6 +32,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
 import org.apache.airavata.commons.gfac.type.MappingFactory;
@@ -109,7 +110,7 @@ public class GridFTPInputHandler extends AbstractHandler {
         jobExecutionContext.setInMessageContext(inputNew);
     }
 
-    private static String stageInputFiles(JobExecutionContext jobExecutionContext, String paramValue) throws URISyntaxException, SecurityException, ToolsException, IOException,GFacException {
+    private static String stageInputFiles(JobExecutionContext jobExecutionContext, String paramValue) throws URISyntaxException, SecurityException, ToolsException, IOException,GFacException, ApplicationSettingsException {
         URI gridftpURL = new URI(paramValue);
 
         String[] gridFTPEndpointArray = null;

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
index 606d613..247ef1f 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
@@ -35,6 +35,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.StringUtil;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
@@ -271,7 +272,7 @@ public class GridFTPOutputHandler extends AbstractHandler {
         return buffer.toString();
     }
 
-    private static void stageOutputFiles(JobExecutionContext jobExecutionContext, String outputFileStagingPath) throws GFacProviderException,GFacException {
+    private static void stageOutputFiles(JobExecutionContext jobExecutionContext, String outputFileStagingPath) throws GFacProviderException,GFacException, ApplicationSettingsException {
 
 
     	   HostDescriptionType hostType = jobExecutionContext.getApplicationContext().getHostDescription().getType();

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
index 9498fb6..9654b7d 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/GramProvider.java
@@ -24,7 +24,6 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
-import java.util.Calendar;
 import java.util.Map;
 import java.util.MissingResourceException;
 import java.util.Properties;
@@ -45,12 +44,7 @@ import org.apache.airavata.gfac.utils.GramJobSubmissionListener;
 import org.apache.airavata.gfac.utils.GramProviderUtils;
 import org.apache.airavata.model.workspace.experiment.CorrectiveAction;
 import org.apache.airavata.model.workspace.experiment.ErrorCategory;
-import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.JobState;
-import org.apache.airavata.model.workspace.experiment.JobStatus;
-import org.apache.airavata.registry.api.workflow.ApplicationJob;
-import org.apache.airavata.registry.api.workflow.ApplicationJob.ApplicationJobStatus;
-import org.apache.airavata.registry.cpi.ChildDataType;
 import org.apache.airavata.schemas.gfac.ApplicationDeploymentDescriptionType;
 import org.apache.airavata.schemas.gfac.GlobusHostType;
 import org.globus.gram.GramException;
@@ -162,7 +156,9 @@ public class GramProvider extends AbstractProvider implements GFacProvider{
 
             submitJobs(gateKeeper, jobExecutionContext, host);
 
-        } finally {
+        } catch (ApplicationSettingsException e) {
+        	throw new GFacException(e.getMessage(), e);
+		} finally {
             if (job != null) {
                 try {
                 	 /*
@@ -299,10 +295,9 @@ public class GramProvider extends AbstractProvider implements GFacProvider{
 
     private void renewCredentials(GramJob gramJob, JobExecutionContext jobExecutionContext) throws GFacException {
 
-        GSSCredential gssCred = ((GSISecurityContext)jobExecutionContext.
-                getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).renewCredentials();
-
         try {
+        	GSSCredential gssCred = ((GSISecurityContext)jobExecutionContext.
+                    getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).renewCredentials();
             gramJob.renew(gssCred);
         } catch (GramException e1) {
             throw new GFacException("Unable to renew credentials. Job Id - "
@@ -310,7 +305,9 @@ public class GramProvider extends AbstractProvider implements GFacProvider{
         } catch (GSSException e1) {
             throw new GFacException("Unable to renew credentials. Job Id - "
                     + gramJob.getIDAsString(), e1);
-        }
+        } catch (ApplicationSettingsException e) {
+        	throw new GFacException(e.getLocalizedMessage(), e);
+		}
     }
 
     private void reSubmitJob(String gateKeeper,
@@ -389,23 +386,27 @@ public class GramProvider extends AbstractProvider implements GFacProvider{
 
         } else {
 
-            GSSCredential gssCred = ((GSISecurityContext)context.
-                    getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).getGssCredentials();
-
-            GramJob gramJob = new GramJob(null);
             try {
-                gramJob.setID(jobId);
-            } catch (MalformedURLException e) {
-                throw new GFacException("Invalid job id - " + jobId, e);
-            }
-            gramJob.setCredentials(gssCred);
-
-            synchronized (this) {
-                if (gramJob.getStatus() != GRAMConstants.STATUS_DONE ||
-                        gramJob.getStatus() != GRAMConstants.STATUS_FAILED) {
-                    cancelJob(gramJob, context);
-                }
-            }
+				GSSCredential gssCred = ((GSISecurityContext)context.
+				        getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).getGssCredentials();
+
+				GramJob gramJob = new GramJob(null);
+				try {
+				    gramJob.setID(jobId);
+				} catch (MalformedURLException e) {
+				    throw new GFacException("Invalid job id - " + jobId, e);
+				}
+				gramJob.setCredentials(gssCred);
+
+				synchronized (this) {
+				    if (gramJob.getStatus() != GRAMConstants.STATUS_DONE ||
+				            gramJob.getStatus() != GRAMConstants.STATUS_FAILED) {
+				        cancelJob(gramJob, context);
+				    }
+				}
+			} catch (ApplicationSettingsException e) {
+				throw new GFacException(e);
+			}
         }
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/gfac/gfac-core/src/test/resources/airavata-client.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/test/resources/airavata-client.properties b/modules/gfac/gfac-core/src/test/resources/airavata-client.properties
deleted file mode 100644
index 17c9c0c..0000000
--- a/modules/gfac/gfac-core/src/test/resources/airavata-client.properties
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-###########################################################################
-#
-#  This properties file provides configuration for Airavata Clients:
-#  XBaya and Airavata API
-#
-###########################################################################
-
-###---------------------------REGISTRY API IMPLEMENTATION---------------------------###
-
-class.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.registry.accessor=org.apache.airavata.rest.client.RegistryClient
-
-###---------------------REGISTRY API IMPLEMENTATION - CUSTOM SETTINGS----------------------###
-
-#for mysql [AiravataJPARegistry]
-#registry.jdbc.driver=com.mysql.jdbc.Driver
-#registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
-
-#for derby [AiravataJPARegistry]
-registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
-registry.jdbc.user=airavata
-registry.jdbc.password=airavata
-start.derby.server.mode=true
-
-default.registry.user=admin
-default.registry.password=admin
-default.registry.password.hash.method=SHA
-default.registry.gateway=default
-
-#for xbaya
-xbaya.registry.user=admin
-xbaya.registry.url=http://localhost:8080/airavata/services/registry
-xbaya.default.gateway=default
-
-trust.store=aiaravata.jks
-trust.store.password=airavata
-
-#user defined registry accessor classes
-#class.provenance.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.configuration.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.descriptor.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.project.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.user.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.published.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/gfac/gfac-core/src/test/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/test/resources/airavata-server.properties b/modules/gfac/gfac-core/src/test/resources/airavata-server.properties
deleted file mode 100644
index 03a43f6..0000000
--- a/modules/gfac/gfac-core/src/test/resources/airavata-server.properties
+++ /dev/null
@@ -1,231 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-###########################################################################
-#
-#  This properties file provides configuration for all Airavata Services: 
-#  Registry, Workflow Interpreter, GFac, Message Broker, Message Box
-#
-###########################################################################
-
-###########################################################################
-# Airavata Embedded-Tomcat Server Configuration
-###########################################################################
-# By default, tomcat runs on port 80. If the port is changed, it will be  
-#  have to be specified with port properties. This will be picked up by 
-#  the registry service to register the service end-points.
-
-port=8080
-
-# Axis2 server automatically picks up IP address from axis configuration, 
-#  but some DHCP enables machines do not report correct ip addresses,  
-#  in which case, the IP address can be manually specified. 
-
-#ip=192.2.33.12
-
-
-#This property will enable https and stops http, during the url registration, https urls will be stored and
-# http urls will not get registered, because currently airavata supports only one url for each service
-#enable.https=false
-
-###########################################################################
-# Airavata Registry Configuration
-###########################################################################
-system.gateway=default
-system.user=admin
-system.password=admin
-#for derby [AiravataJPARegistry]
-registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
-# MySql database configuration
-#registry.jdbc.driver=com.mysql.jdbc.Driver
-#registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
-registry.jdbc.user=airavata
-registry.jdbc.password=airavata
-start.derby.server.mode=true
-default.registry.user=admin
-default.registry.password=admin
-default.registry.password.hash.method=SHA
-default.registry.gateway=default
-validationQuery=SELECT 1 from CONFIGURATION
-jpa.connection.properties=MaxActive=10,MaxIdle=5,MinIdle=2,MaxWait=60000,testWhileIdle=true,testOnBorrow=true
-#for rest [RegistryClient]
-#registry.jdbc.url=http://localhost:9080/airavata-services
-
-#user defined registry accessor classes
-#class.provenance.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.configuration.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.descriptor.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.project.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.user.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.published.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-
-###########################################################################
-# Airavata Workflow Interpreter Configurations
-###########################################################################
-
-runInThread=true
-provenance=true
-provenanceWriterThreadPoolSize=20
-gfac.embedded=true
-
-#
-# Security Configuration used by Airavata Generic Factory Service
-#  to interact with Computational Resources.
-#
-
-###########################################################################
-# Airavata GFac MyProxy GSI credentials to access Grid Resources.
-###########################################################################
-
-myproxy.server=myproxy.teragrid.org
-myproxy.user=username
-myproxy.pass=password
-myproxy.life=3600
-# XSEDE Trusted certificates can be downloaded from https://software.xsede.org/security/xsede-certs.tar.gz
-trusted.cert.location=modules/gfac-core/src/test/resources/certificates
-
-# SSH PKI key pair is SSH based authentication is used.
-#ssh.key=/home/user/.ssh/id_rsa
-#ssh.keypass=
-#ssh.username=usernameAtHost
-
-###########################################################################
-# Airavata Message Broker Basic Configurations.
-#  the Advanced section provides detailed custom configuration properties.
-###########################################################################
-
-# Default derby database configuration
-broker.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
-broker.jdbc.url=jdbc:derby:wsmg;create=true;user=airavata;password=airavata
-
-# Note: This database will only be used  if 'broker.storage.type=persistent' 
-#       is set in advanced properties below.
-# MySql database configuration
-#broker.jdbc.driver=com.mysql.jdbc.Driver
-#broker.jdbc.url=jdbc:mysql://localhost:3306/wsmg?user=airavata&password=airavata
-
-###########################################################################
-# Airavata Message Box Basic Configurations, 
-#  the Advanced section provides detailed custom configuration properties.
-###########################################################################  
-
-# Default derby database
-msgBox.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
-msgBox.jdbc.url=jdbc:derby:wsmg;create=true;user=airavata;password=airavata
-
-# MySql database configuration
-#msgBox.jdbc.driver=com.mysql.jdbc.Driver
-#msgBox.jdbc.url=jdbc:mysql://localhost:3306/wsmg?user=airavata&password=airavata
-
-###########################################################################
-# Advance configuration to change service implementations
-###########################################################################
-
-#Update the server context root path if airavata server is deployed under a different context root other than axis2
-server.context-root=airavata-server
-
-#
-# Class which implemented HostScheduler interface. It will determine the which host to submit the request
-#
-host.scheduler=org.apache.airavata.gfac.scheduler.impl.SimpleHostScheduler
-
-#
-# Data Service Plugins classes
-#
-datachain.classes= org.apache.airavata.core.gfac.extension.data.RegistryDataService
-
-#
-# Pre execution Plugins classes. For example, GridFTP Input Staging
-#
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.GridFtpInputStaging
-prechain.classes= org.apache.airavata.core.gfac.extension.pre.HttpInputStaging
-
-#
-# Post execution Plugins classes. For example, GridFTP Output Staging
-#
-postchain.classes= org.apache.airavata.core.gfac.extension.post.GridFtpOutputStaging
-postchain.classes= org.apache.airavata.core.gfac.extension.post.OutputRegister
-
-#
-# Advanced Message Broker Configurations
-#
-
-#socket time out in milliseconds for sending messages. (defaults is 20000)
-broker.socket.timeout=60000
-
-broker.storage.type=persistent
-#broker.storage.type=memory
-
-#specifies wether delivery component should be started or not.
-broker.start.delivery.thread=true
-
-#fixed thread pool based delivery
-#broker.delivery.method=pcrew
-
-#dynamic thread pool based delivery
-#broker.delivery.method=parallel
-
-#single thread delivery
-broker.delivery.method=serial
-
-#number of message delivery failures before a url become black listed (default is 2)
-#broker.msg.delivery.retries=2
-
-#time period (in seconds) a url will be kept blacklisted (default is 5 seconds) 
-#consumer.expiration.time.gap=5 
-
-#maximum number of messages to be send to a one consumer/url at time. 
-#applicable if 'broker.delivery.method' is 'pcrew' . (default is 10)
-
-#sending.batch.size=10
-
-#size of the thread pool. only applicable if 'broker.delivery.method' is 'pcrew'. (default is 4)
-#sending.thread.pool.size=4
-
-#
-# Advanced Message Box Configurations
-#
-#trusted.cert.location=/Users/lahirugunathilake/Downloads/certificates
-public.ssh.key=/Users/lahirugunathilake/.ssh/id_dsa.pub
-# SSH PKI key pair is SSH based authentication is used.
-ssh.key=/home/user/.ssh/id_rsa
-ssh.username=lginnali
-private.ssh.key=/Users/lahirugunathilake/.ssh/id_dsa
-ssh.password=
-msgBox.usedatabase=true
-messagePreservationDays=2
-messagePreservationHours=0
-messagePreservationMinutes=0
-messagePerservationIntervalDays=0
-messagePerservationIntervalHours=1
-messagePerservationIntervalMinutes=0
-
-###---------------------------REGISTRY API IMPLEMENTATION---------------------------###
-
-class.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.registry.accessor=org.apache.airavata.rest.client.RegistryClient
-
-###---------------------------Computational Middleware Configurations---------------------------###
-
-#enable.application.job.status.history=true
-#http://localhost:8080/axis2/services/RegistryService?wsdl
-registry.service.wsdl=http://localhost:${port}/${server.context-root}/services/RegistryService?wsdl
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/gfac/gfac-ec2/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ec2/pom.xml b/modules/gfac/gfac-ec2/pom.xml
index 11ce4ca..7d696e6 100644
--- a/modules/gfac/gfac-ec2/pom.xml
+++ b/modules/gfac/gfac-ec2/pom.xml
@@ -125,6 +125,10 @@
             <artifactId>slf4j-log4j12</artifactId>
             <scope>test</scope>
         </dependency>
-
+	<dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-client-configuration</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/ea57ef58/modules/gfac/gfac-ec2/src/test/resources/airavata-client.properties
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ec2/src/test/resources/airavata-client.properties b/modules/gfac/gfac-ec2/src/test/resources/airavata-client.properties
deleted file mode 100644
index 7b76203..0000000
--- a/modules/gfac/gfac-ec2/src/test/resources/airavata-client.properties
+++ /dev/null
@@ -1,67 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-###########################################################################
-#
-#  This properties file provides configuration for Airavata Clients:
-#  XBaya and Airavata API
-#
-###########################################################################
-
-###---------------------------REGISTRY API IMPLEMENTATION---------------------------###
-
-class.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.registry.accessor=org.apache.airavata.rest.client.RegistryClient
-
-###---------------------REGISTRY API IMPLEMENTATION - CUSTOM SETTINGS----------------------###
-
-#for mysql [AiravataJPARegistry]
-#registry.jdbc.driver=com.mysql.jdbc.Driver
-#registry.jdbc.url=jdbc:mysql://localhost:3306/persistent_data
-
-#for derby [AiravataJPARegistry]
-registry.jdbc.driver=org.apache.derby.jdbc.ClientDriver
-registry.jdbc.url=jdbc:derby://localhost:1527/persistent_data;create=true;user=airavata;password=airavata
-registry.jdbc.user=airavata
-registry.jdbc.password=airavata
-start.derby.server.mode=true
-
-default.registry.user=admin
-default.registry.password=admin
-default.registry.password.hash.method=SHA
-default.registry.gateway=default
-
-#for xbaya
-xbaya.registry.user=admin
-xbaya.registry.url=http://localhost:8080/airavata/services/registry
-xbaya.default.gateway=default
-
-trust.store=aiaravata.jks
-trust.store.password=airavata
-
-#user defined registry accessor classes
-#class.provenance.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.configuration.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.descriptor.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.project.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.user.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-#class.published.workflow.registry.accessor=org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry
-
-