I agree that the EE spec requires the TCCL to be set up for any 'invocation on application methods'. And CDI Extensions are surely part of the application. Otoh please note that Apache OpenWebBeans has no single usage of Thread.currentThread().setContextClassLoader(); in it's codebase. It should imo be part of the integration. No sure what OWB does different that it is possible. I cannot judge as I don't know the Weld codebase. Otoh I'm pretty confident that the setup which got used in WebSphere 8 (separate BeanManagers per WAR) should also work fine with Weld as CDI container. |