felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1002635 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java
Date Wed, 29 Sep 2010 14:04:14 GMT
Author: fmeschbe
Date: Wed Sep 29 14:04:14 2010
New Revision: 1002635

URL: http://svn.apache.org/viewvc?rev=1002635&view=rev
Log:
FELIX-2635 Apply patch by Victor Antonovich (slightly modified to explicitly assign null after
destroyal and adding try-catch around the destroy calls)

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java?rev=1002635&r1=1002634&r2=1002635&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/PluginHolder.java
Wed Sep 29 14:04:14 2010
@@ -270,11 +270,10 @@ class PluginHolder implements ServiceLis
      */
     void setServletContext( ServletContext servletContext )
     {
-        this.servletContext = servletContext;
-
         final Plugin[] plugin = getPlugins();
         if ( servletContext != null )
         {
+            this.servletContext = servletContext;
             for ( int i = 0; i < plugin.length; i++ )
             {
                 try
@@ -291,8 +290,13 @@ class PluginHolder implements ServiceLis
         {
             for ( int i = 0; i < plugin.length; i++ )
             {
-                plugin[i].destroy();
+                try {
+                    plugin[i].destroy();
+                } catch (Throwable t) {
+                    // TODO: log !!
+                }
             }
+            this.servletContext = null;
         }
     }
 



Mime
View raw message