Author: mstruk
Date: 2011-09-29 07:16:26 -0400 (Thu, 29 Sep 2011)
New Revision: 7559
Modified:
sandbox/as7_support/trunk/wci/jboss/jboss7/src/main/java/org/gatein/wci/jboss/JB7ServletContainerContext.java
Log:
Added fix for deadlock on stop()
Modified:
sandbox/as7_support/trunk/wci/jboss/jboss7/src/main/java/org/gatein/wci/jboss/JB7ServletContainerContext.java
===================================================================
---
sandbox/as7_support/trunk/wci/jboss/jboss7/src/main/java/org/gatein/wci/jboss/JB7ServletContainerContext.java 2011-09-29
11:15:55 UTC (rev 7558)
+++
sandbox/as7_support/trunk/wci/jboss/jboss7/src/main/java/org/gatein/wci/jboss/JB7ServletContainerContext.java 2011-09-29
11:16:26 UTC (rev 7559)
@@ -374,9 +374,14 @@
{
try
{
- if (registration != null)
+ // we need to preemptively synchronize on context to prevent deadlocks from
+ // opposite order locking on jboss-as7
+ synchronized(context)
{
- registration.unregisterWebApp(context.getPath());
+ if (registration != null)
+ {
+ registration.unregisterWebApp(context.getPath());
+ }
}
}
catch (Exception e)
Show replies by date