airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1414396 - /airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
Date Tue, 27 Nov 2012 20:42:32 GMT
Author: samindaw
Date: Tue Nov 27 20:42:32 2012
New Revision: 1414396

URL: http://svn.apache.org/viewvc?rev=1414396&view=rev
Log:
handle the case we do not provide the registry url

Modified:
    airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java

Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java?rev=1414396&r1=1414395&r2=1414396&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
(original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
Tue Nov 27 20:42:32 2012
@@ -197,8 +197,10 @@ public class AiravataClient implements A
 	
 	 private static HashMap<String, String> createConfig(URI registryUrl,String username,
String password) throws RepositoryException,	 RegistryException, AiravataConfigurationException
{
 		HashMap<String, String> config = new HashMap<String, String>();
-		config.put(AiravataClient.REGISTRY, registryUrl.toString());
-//		config.put(AiravataClient.JCR_USERNAME, username);
+		if (registryUrl!=null) {
+			config.put(AiravataClient.REGISTRY, registryUrl.toString());
+		}
+		//		config.put(AiravataClient.JCR_USERNAME, username);
 //		config.put(AiravataClient.JCR_PASSWORD, password);
 		AiravataRegistry2 registryObject = getRegistry(registryUrl, "default", username, new PasswordCallBackImpl(username,
password));
 		if (registryObject != null) {
@@ -260,7 +262,7 @@ public class AiravataClient implements A
 			clientConfiguration.setMessagebrokerURL(new URL(configuration
 					.get(BROKER)));
 		}
-		 if (configuration.get(REGISTRY)!= null) {
+		 if (configuration.containsKey(REGISTRY)) {
 			 clientConfiguration.setRegistryURL(new URL(configuration.get(REGISTRY)));
 		 }
 		if (configuration.get(WORKFLOWSERVICEURL) != null) {



Mime
View raw message