geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r911244 - /geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/extender/WebContainerExtender.java
Date Thu, 18 Feb 2010 01:41:59 GMT
Author: gawor
Date: Thu Feb 18 01:41:58 2010
New Revision: 911244

URL: http://svn.apache.org/viewvc?rev=911244&view=rev
Log:
avoid deadlock

Modified:
    geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/extender/WebContainerExtender.java

Modified: geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/extender/WebContainerExtender.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/extender/WebContainerExtender.java?rev=911244&r1=911243&r2=911244&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/extender/WebContainerExtender.java
(original)
+++ geronimo/server/trunk/plugins/wab/geronimo-web-extender/src/main/java/org/apache/geronimo/osgi/web/extender/WebContainerExtender.java
Thu Feb 18 01:41:58 2010
@@ -224,7 +224,11 @@
      */
     private void undeploy(WebApplication wab) {
         WebApplications webApplications = contextPathMap.get(wab.getContextPath());
-        webApplications.remove(wab);
+        if (wab == webApplications.getDeployed()) {
+            wab.undeploy();
+        } else {
+            webApplications.remove(wab);
+        }
     }
 
     /**
@@ -337,12 +341,7 @@
         }
         
         public synchronized void remove(WebApplication webApp) {
-            if (deployed == webApp) {
-                // this will cause unregister() to be invoked
-                deployed.undeploy();
-            } else {
-                waiting.remove(webApp);
-            }
+            waiting.remove(webApp);
         }
         
         public synchronized WebApplication getDeployed() {



Mime
View raw message