[wsas-java-dev] svn commit r116 - wsas/java/trunk/modules/servlet-edition/src/org/wso2/wsas

svn at wso2.com svn at wso2.com
Sat Dec 2 06:08:09 PST 2006


Author: azeez
Date: Sat Dec  2 06:08:08 2006
New Revision: 116

Modified:
   wsas/java/trunk/modules/servlet-edition/src/org/wso2/wsas/MainServlet.java
Log:
Fix for WSAS-166

Modified: wsas/java/trunk/modules/servlet-edition/src/org/wso2/wsas/MainServlet.java
==============================================================================
--- wsas/java/trunk/modules/servlet-edition/src/org/wso2/wsas/MainServlet.java	(original)
+++ wsas/java/trunk/modules/servlet-edition/src/org/wso2/wsas/MainServlet.java	Sat Dec  2 06:08:08 2006
@@ -95,7 +95,7 @@
                 log.info("WSO2 WSAS startup failed.");
                 return;
             }
-            System.setProperty("wso2wsas.home", wso2wsasHome);
+            System.setProperty(ServerConstants.WSO2WSAS_HOME, wso2wsasHome);
             log.info("Using WSO2 WSAS Home = " + wso2wsasHome);
             File file = new File(wso2wsasHome);
             if (!file.exists()) {
@@ -137,10 +137,12 @@
             is.close();
 
             ServerConfiguration serverConfig = ServerConfiguration.getInstance();
-            serverConfig.setConfigurationProperty("Security.KeyStoresDir",
-                                                  wso2wsasHome + File.separator +
-                                                  serverConfig.
-                                                          getFirstProperty("Security.KeyStoresDir"));
+            String ksDir = serverConfig.getFirstProperty("Security.KeyStoresDir");
+            if (ksDir.indexOf(wso2wsasHome) == -1) { // set the ks dir only if not already set
+                serverConfig.setConfigurationProperty("Security.KeyStoresDir",
+                                                      wso2wsasHome + File.separator +
+                                                      ksDir);
+            }
         } catch (IOException e) {
             log.error("wso2wsas.properties file cannot be read", e);
             log.info("WSO2 WSAS startup failed.");




More information about the Wsas-java-dev mailing list