[wsas-java-dev] svn commit r1694 - in trunk/wsas/java/modules: admin/src/org/wso2/wsas/admin/service clustering/src/org/wso2/wsas/clustering

svn at wso2.org svn at wso2.org
Mon Apr 2 03:16:04 PDT 2007


Author: azeez
Date: Mon Apr  2 03:15:55 2007
New Revision: 1694

Modified:
   trunk/wsas/java/modules/admin/src/org/wso2/wsas/admin/service/GlobalAdmin.java
   trunk/wsas/java/modules/clustering/src/org/wso2/wsas/clustering/WSASConfigManagerListener.java
Log:
Maintianign new config ctx in the pending commits map



Modified: trunk/wsas/java/modules/admin/src/org/wso2/wsas/admin/service/GlobalAdmin.java
==============================================================================

Modified: trunk/wsas/java/modules/clustering/src/org/wso2/wsas/clustering/WSASConfigManagerListener.java
==============================================================================
--- trunk/wsas/java/modules/clustering/src/org/wso2/wsas/clustering/WSASConfigManagerListener.java	(original)
+++ trunk/wsas/java/modules/clustering/src/org/wso2/wsas/clustering/WSASConfigManagerListener.java	Mon Apr  2 03:15:55 2007
@@ -37,7 +37,7 @@
 import java.util.Vector;
 
 /**
- * 
+ *
  */
 public class WSASConfigManagerListener implements ConfigurationManagerListener {
 
@@ -50,7 +50,6 @@
 
     private ConfigurationContext configurationContext;
 
-    private ConfigurationContext newConfigurationContext;
     private List pendingCommits = new Vector();
 
     /**
@@ -166,13 +165,13 @@
                     getFirstProperty("Axis2Config.ConfigurationFile");
         }
         try {
-            pendingCommits.add(new Commit(LOAD_CONFIGURATION_EVENT, "true"));
             ServerConfigurator.getInstance().init(repoLocation,
                                                   axis2XML,
                                                   System.getProperty(ServerConstants.WEB_RESOURCE_LOCATION));
-            newConfigurationContext =
+            ConfigurationContext newConfigurationContext =
                     ConfigurationContextFactory
                             .createConfigurationContext(ServerConfigurator.getInstance());
+            pendingCommits.add(new Commit(LOAD_CONFIGURATION_EVENT, newConfigurationContext));
             log.info("New configuration successfully loaded and cached. " +
                      "Waiting for prepare request...");
 
@@ -318,8 +317,10 @@
                                 (Controllable) configurationContext.
                                         getProperty(ServerConstants.WSO2WSAS_INSTANCE);
                         try {
-                            controllable.setConfigurationContext(newConfigurationContext);
-                            configurationContext = newConfigurationContext;
+                            ConfigurationContext configCtx =
+                                    (ConfigurationContext) commit.getObject();
+                            controllable.setConfigurationContext(configCtx);
+                            configurationContext = configCtx;
                         } catch (Exception e) {
                             log.error("Cannot commit " + LOAD_CONFIGURATION_EVENT, e);
                         }
@@ -365,7 +366,6 @@
         isCommitReceived = false;
         isPreparing = false;
         isProcessing = false;
-        newConfigurationContext = null;
         configurationContext.getProperties().remove(ServerConstants.BLOCK_ALL_REQUESTS);
         for (Iterator iter = configurationContext.getAxisConfiguration().getServiceGroups();
              iter.hasNext();) {




More information about the Wsas-java-dev mailing list