You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ra...@apache.org on 2012/11/27 23:41:55 UTC

svn commit: r1414450 - /airavata/trunk/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java

Author: raminder
Date: Tue Nov 27 22:41:54 2012
New Revision: 1414450

URL: http://svn.apache.org/viewvc?rev=1414450&view=rev
Log:
Changed exception handling

Modified:
    airavata/trunk/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java

Modified: airavata/trunk/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java?rev=1414450&r1=1414449&r2=1414450&view=diff
==============================================================================
--- airavata/trunk/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java (original)
+++ airavata/trunk/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java Tue Nov 27 22:41:54 2012
@@ -21,8 +21,18 @@
 
 package org.apache.airavata.workflow.model.component.registry;
 
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
 import org.apache.airavata.client.AiravataAPIFactory;
 import org.apache.airavata.client.api.AiravataAPI;
+import org.apache.airavata.client.api.AiravataAPIInvocationException;
 import org.apache.airavata.commons.gfac.type.ServiceDescription;
 import org.apache.airavata.registry.api.AiravataRegistryConnectionDataProvider;
 import org.apache.airavata.registry.api.AiravataRegistryFactory;
@@ -34,16 +44,6 @@ import org.apache.airavata.workflow.mode
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.jcr.RepositoryException;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
 public class JCRComponentRegistry extends ComponentRegistry {
 
     private static final Logger log = LoggerFactory.getLogger(JCRComponentRegistry.class);
@@ -87,10 +87,10 @@ public class JCRComponentRegistry extend
 			}
         }
         if (username==null){
-        	username="admin";	
+        	username="admin";
         }
         if (gatewayName==null){
-        	gatewayName="default";	
+        	gatewayName="default";
         }
         try {
             URI baseUri = new URI(registryURL);
@@ -99,9 +99,7 @@ public class JCRComponentRegistry extend
             this.airavataAPI = AiravataAPIFactory.getAPI(baseUri, gatewayName, username, passwordCallBack);
         }  catch (URISyntaxException e) {
             log.error("Error initializing Airavata Client");
-        } catch (RepositoryException e) {
-            log.error("Error initializing Airavata Client");
-        } catch (MalformedURLException e) {
+        } catch (AiravataAPIInvocationException e) {
             log.error("Error initializing Airavata Client");
         }