Author: azeez
Date: Tue Apr 24 13:41:40 2012
New Revision: 1329711

URL: http://svn.apache.org/viewvc?rev=1329711&view=rev
Log:
If an exception, like a security exception occurs during calling module & 
service shutdown, we should continue calling shutdown on other modules & 
services, without throwing an exception and halting the entire cleanup & 
ConfigurationContext termination flow


Modified:
    
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?rev=1329711&r1=1329710&r2=1329711&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
 Tue Apr 24 13:41:40 2012
@@ -744,7 +744,11 @@ public class ConfigurationContext extend
                     AxisModule axisModule = (AxisModule) moduleitr.next();
                     Module module = axisModule.getModule();
                     if (module != null) {
-                        module.shutdown(this);
+                        try {
+                            module.shutdown(this);
+                        } catch (Exception e) {
+                            log.warn("Could not shutdown module " + 
module.getClass().getName(), e);
+                        }
                     }
                 }
             }
@@ -760,7 +764,11 @@ public class ConfigurationContext extend
                 AxisService axisService = (AxisService) services.next();
                 ServiceLifeCycle serviceLifeCycle = 
axisService.getServiceLifeCycle();
                 if (serviceLifeCycle != null) {
-                    serviceLifeCycle.shutDown(this, axisService);
+                    try {
+                        serviceLifeCycle.shutDown(this, axisService);
+                    } catch (Exception e) {
+                        log.warn("Could not shutdown service " + 
axisService.getName(), e);
+                    }
                 }
             }
         }


Reply via email to