Author: chathura
Date: Thu Jan 10 20:58:50 2008
New Revision: 12125

Log:


Removed the code to write configuration to the registry.xml on shutdown. We 
don't need this a now the config cannot be edited at runtime.



Modified:
   
trunk/registry/modules/core/src/main/java/org/wso2/registry/servlet/RegistryServlet.java

Modified: 
trunk/registry/modules/core/src/main/java/org/wso2/registry/servlet/RegistryServlet.java
==============================================================================
--- 
trunk/registry/modules/core/src/main/java/org/wso2/registry/servlet/RegistryServlet.java
    (original)
+++ 
trunk/registry/modules/core/src/main/java/org/wso2/registry/servlet/RegistryServlet.java
    Thu Jan 10 20:58:50 2008
@@ -246,19 +246,23 @@
 
     public void destroy() {
         super.destroy();
-        if (configPath == null) {
-            configPath = getServletConfig().getServletContext().
-                    getRealPath("/WEB-INF/registry.xml");
-        }
-        try {
-            FileOutputStream fio = new FileOutputStream(configPath);
-            OMElement registryXml = 
registryConfiguration.getRegistryConfigAsXML();
-            registryXml.serialize(fio);
-            fio.flush();
-            fio.close();
-        } catch (Exception e) {
-            //
-        }
+
+        // we don't need to update the registry.xml at shutdown as for now we 
consider the config
+        // as static. therefore, this may confuse users.
+        
+        //if (configPath == null) {
+        //    configPath = getServletConfig().getServletContext().
+        //            getRealPath("/WEB-INF/registry.xml");
+        //}
+        //try {
+        //    FileOutputStream fio = new FileOutputStream(configPath);
+        //    OMElement registryXml = 
registryConfiguration.getRegistryConfigAsXML();
+        //    registryXml.serialize(fio);
+        //    fio.flush();
+        //    fio.close();
+        //} catch (Exception e) {
+        //    //
+        //}
     }
 
     private void setErrorMessage(HttpServletRequest request, String message) {

_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev

Reply via email to