[jboss-cvs] JBossAS SVN: r105086 - projects/jboss-cl/trunk/classloading/src/main/java/org/jboss/classloading/spi/dependency/wildcard.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri May 21 08:16:53 EDT 2010
Author: alesj
Date: 2010-05-21 08:16:53 -0400 (Fri, 21 May 2010)
New Revision: 105086
Modified:
projects/jboss-cl/trunk/classloading/src/main/java/org/jboss/classloading/spi/dependency/wildcard/WildcardClassLoaderPolicy.java
Log:
Ignore non-cascade modules on undeploy / remove.
Modified: projects/jboss-cl/trunk/classloading/src/main/java/org/jboss/classloading/spi/dependency/wildcard/WildcardClassLoaderPolicy.java
===================================================================
--- projects/jboss-cl/trunk/classloading/src/main/java/org/jboss/classloading/spi/dependency/wildcard/WildcardClassLoaderPolicy.java 2010-05-21 06:45:27 UTC (rev 105085)
+++ projects/jboss-cl/trunk/classloading/src/main/java/org/jboss/classloading/spi/dependency/wildcard/WildcardClassLoaderPolicy.java 2010-05-21 12:16:53 UTC (rev 105086)
@@ -271,49 +271,53 @@
public void removeModule(Module current)
{
- boolean sameModule = module == current;
- boolean resolvedModule = false;
+ boolean cascade = current.isCascadeShutdown();
+ // Non-cascade is updated / bounced via refresh
+ if (cascade)
+ {
+ boolean sameModule = module == current;
+ boolean resolvedModule = false;
- synchronized (this)
- {
- if (modules.remove(current))
+ synchronized (this)
{
- if (sameModule == false)
+ if (modules.remove(current))
{
- resolvedModule = true; // we were part of matching modules, but not our module
- Domain md = getDomain(current);
- boolean isAncestor = (domain != md);
- if (isAncestor && domain.isParentFirst())
- parentsBefore--;
+ if (sameModule == false)
+ {
+ resolvedModule = true; // we were part of matching modules, but not our module
+ Domain md = getDomain(current);
+ boolean isAncestor = (domain != md);
+ if (isAncestor && domain.isParentFirst())
+ parentsBefore--;
+ }
+ reset();
}
- reset();
}
- }
- // Unregister this policy as module listener
- if (sameModule)
- {
- ClassLoading classLoading = domain.getClassLoading();
- classLoading.removeModuleRegistry(this);
- this.module = null;
- }
+ // Unregister this policy as module listener
+ if (sameModule)
+ {
+ ClassLoading classLoading = domain.getClassLoading();
+ classLoading.removeModuleRegistry(this);
+ this.module = null;
+ }
- // It's not us (we're already uninstalling) and we used this, let's bounce.
- if (resolvedModule && used.remove(current))
- {
- LifeCycle lifeCycle = module.getLifeCycle();
- // Non-cascade is updated / bounced via refresh
- if (lifeCycle != null && current.isCascadeShutdown())
+ // It's not us (we're already uninstalling) and we used this, let's bounce.
+ if (resolvedModule && used.remove(current))
{
- try
+ LifeCycle lifeCycle = module.getLifeCycle();
+ if (lifeCycle != null)
{
- lifeCycle.bounce(); // let's refresh the wired resources
+ try
+ {
+ lifeCycle.bounce(); // let's refresh the wired resources
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Error bouncing module: " + this.module, e);
+ }
}
- catch (Exception e)
- {
- throw new RuntimeException("Error bouncing module: " + this.module, e);
- }
}
}
}
More information about the jboss-cvs-commits
mailing list