I believe this is a bug in EnhancedListener. It should not shutdown the Weld if org.jboss.weld.environment.servlet.Listener is registered because it's always added to the end of the list of listeners from web.xml (i.e. its contextDestroyed() is called before any listeners defined in web.xml). I've created the issue: https://issues.jboss.org/browse/WELD-1808
Thanks for your quick reply! Are you aware of any workarounds until this bug will be fixed? For instance, is it possible to disabled EnhancedListener and would everything else still work as expected?
Well, there is no Weld-specific way to disable the EnhancedListener (it's actually a
ServletContainerInitializer). However, you can use container-specific configuration, e.g.
containerSciFilterattribute of the Context for Tomcat.