-
Bug
-
Resolution: Done
-
Major
-
10.0.0.CR4
-
None
The cleanup is currently only performed as a part of org.jboss.as.weld.WeldStartService.stop(StopContext) invocation. However, if WeldStartService.start() fails (e.g. because of a validation error) the stop method is never invoked. Some Weld bootstrap services need to clean up resources even if the deployment fails, e.g. org.jboss.weld.bootstrap.events.ContainerLifecycleEvents (deactivable optimization) maintains a separate thread pool and so the referenced ExecutorService is never shut down explicitly and the only hope to free resources is the GC and finalizers whose execution is deferred and may never even occur.
We've run into this problem when executing Weld and CDI TCK test suites on a specific HP-UX machine. Both test suites contain a lot of scenarios where the deployment fails. HP-UX jvm cannot handle this load and the test suite fails with "java.lang.OutOfMemoryError: unable to create new native thread".
- is related to
-
WFLY-6031 WeldProvider.containerShutDown() not invoked if the deployment fails
- Closed