Thanks Matěj Novotný in general yes the class loaders of the deployment are discarded on redeploy so any static references would also be discarded at the same time, however there is a recent trend for more spec defined implementations to be created as CDI implementations, within the application server (WildFly) that means we install them as shared modules so each app doesn't need to bring them all in manually but that is where if one of them contains static references they will live on longer than they should. Overall IMO the real bug is within the framework as mixing CDI and statics seems high risk - especially where those statics contain references to beans so I will be looking to contribute a fix there. But if I can find a way to adapt the error message in the BeanManager it may be quicker to track that is it a stale reference still held if we were to encounter a similar issue in the future. |