airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1416023 - /airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServiceUtils.java
Date Sat, 01 Dec 2012 17:04:57 GMT
Author: samindaw
Date: Sat Dec  1 17:04:56 2012
New Revision: 1416023

URL: http://svn.apache.org/viewvc?rev=1416023&view=rev
Log:
retrieve the port seperately

Modified:
    airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServiceUtils.java

Modified: airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServiceUtils.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServiceUtils.java?rev=1416023&r1=1416022&r2=1416023&view=diff
==============================================================================
--- airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServiceUtils.java
(original)
+++ airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/ServiceUtils.java
Sat Dec  1 17:04:56 2012
@@ -45,25 +45,31 @@ public class ServiceUtils {
         String port = null;
 //        Properties properties = new Properties();
         try {
-//            properties.load(url.openStream());
             localAddress = ServerSettings.getSetting(IP);
-            port = (String) ServerSettings.getSetting(PORT);
         } catch (ServerSettingsException e) {
 			//we will ignore this exception since the properties file will not contain the values
 			//when it is ok to retrieve them from the axis2 context
 		}
         if(localAddress == null){
-        try {
-            localAddress = Utils.getIpAddress(context
-                    .getAxisConfiguration());
-        } catch (SocketException e) {
-            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
-        }
+	        try {
+	            localAddress = Utils.getIpAddress(context
+	                    .getAxisConfiguration());
+	        } catch (SocketException e) {
+	            e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
+	        }
         }
-        TransportInDescription transportInDescription = context
-                .getAxisConfiguration().getTransportsIn()
-                .get("http");
+        
+        try {
+            port = (String) ServerSettings.getSetting(PORT);
+        } catch (ServerSettingsException e) {
+			//we will ignore this exception since the properties file will not contain the values
+			//when it is ok to retrieve them from the axis2 context
+		}
+        
         if (port == null) {
+            TransportInDescription transportInDescription = context
+                    .getAxisConfiguration().getTransportsIn()
+                    .get("http");
             if (transportInDescription != null
                     && transportInDescription.getParameter("port") != null) {
                 port = (String) transportInDescription



Mime
View raw message