Commit 393d4c69bfda82166d6ad5cb0ca9d9b9e3abda06
1 parent
c90630ec
Exists in
master
Desregistrando os pseudo-contextos no momento correto
Showing
1 changed file
with
4 additions
and
2 deletions
Show diff stats
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/bootstrap/StartupBootstrap.java
| ... | ... | @@ -127,7 +127,7 @@ public class StartupBootstrap extends AbstractBootstrap { |
| 127 | 127 | ClassLoader classLoader = ConfigurationLoader.getClassLoaderForClass(processor.getAnnotatedMethod() |
| 128 | 128 | .getDeclaringType().getJavaClass().getCanonicalName()); |
| 129 | 129 | |
| 130 | - if (classLoader.equals(Thread.currentThread().getContextClassLoader())) { | |
| 130 | + if (Thread.currentThread().getContextClassLoader().equals(classLoader)) { | |
| 131 | 131 | processor.process(); |
| 132 | 132 | |
| 133 | 133 | if (remove) { |
| ... | ... | @@ -140,7 +140,9 @@ public class StartupBootstrap extends AbstractBootstrap { |
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - unloadTempContexts(); | |
| 143 | + if (processors.isEmpty()){ | |
| 144 | + unloadTempContexts(); | |
| 145 | + } | |
| 144 | 146 | |
| 145 | 147 | if (failure != null) { |
| 146 | 148 | throw new DemoiselleException(failure); | ... | ... |