Redeploying on wildfly cause outofmemory: metaspace
<p>I'm currently investigating some out of meta space issues we've been experiencing recently. One of the main culprits seems to be the loading of duplicate classes upon redeployment of a WAR. Trying it out locally, with just one of our WARS, by heap dumping after undeploying completely, I can see that the majority of the instances created by the application are still there (even after garbage collection). </p>

<p>From the heap dump, I can see that it seems to be the ManagedThreadFactoryImpl that is holding onto references.</p>

<p>Is there anything I can do/add to the application shutdown process so it cleans up after itself?</p>

<p>All our WARs are spring applications, most use scheduling/asynchronous elements.</p>

<p>We're using JDK8 with Wildfly 8.2</p>