You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2012/12/05 17:10:59 UTC

svn commit: r1417503 - /airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/GFacService.java

Author: lahiru
Date: Wed Dec  5 16:10:58 2012
New Revision: 1417503

URL: http://svn.apache.org/viewvc?rev=1417503&view=rev
Log:
fixing error when running 10 minutes article.

Modified:
    airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/GFacService.java

Modified: airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/GFacService.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/GFacService.java?rev=1417503&r1=1417502&r2=1417503&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/GFacService.java (original)
+++ airavata/trunk/modules/gfac-axis2/src/main/java/org/apache/airavata/services/gfac/axis2/GFacService.java Wed Dec  5 16:10:58 2012
@@ -119,21 +119,19 @@ public class GFacService implements Serv
                         Thread.sleep(JCR_AVAIALABILITY_WAIT_INTERVAL);
                     } catch (InterruptedException e1) {
                         e1.printStackTrace();
-
-                        try {
-                            if (ServerSettings.getSystemUser() != null) {
-                                username = ServerSettings.getSystemUser();
-                            }
-                            if (ServerSettings.getSystemUserPassword() != null) {
-                                password = ServerSettings.getSystemUserPassword();
-                            }
-                            gatewayName = ServerSettings.getDefaultGatewayId();
-                        }catch (ServerSettingsException e) {
-                            log.error("Unable to read properties", e);
+                    }
+                    try {
+                        if (ServerSettings.getSystemUser() != null) {
+                            username = ServerSettings.getSystemUser();
                         }
+                        if (ServerSettings.getSystemUserPassword() != null) {
+                            password = ServerSettings.getSystemUserPassword();
+                        }
+                        gatewayName = ServerSettings.getDefaultGatewayId();
+                    } catch (ServerSettingsException e) {
+                        log.error("Unable to read properties", e);
                     }
-
-                    airavataAPI = AiravataAPIFactory.getAPI(gatewayName, username);
+                    airavataAPI = AiravataAPIFactory.getAPI(ServerSettings.getDefaultGatewayId(), ServerSettings.getSystemUser());
                     context.setProperty(GFAC_URL, ServiceUtils.generateServiceURLFromConfigurationContext(context,SERVICE_NAME));
                     GFacConfiguration gfacConfig = new GFacConfiguration(ServerSettings.getSetting(MYPROXY_SERVER),ServerSettings.getSetting(MYPROXY_USER),
                             ServerSettings.getSetting(MYPROXY_PASS),Integer.parseInt(ServerSettings.getSetting(MYPROXY_LIFE)),airavataAPI,ServerSettings.getSetting(TRUSTED_CERT_LOCATION));