sanne.grinovero wrote:
And again, did you try WildFly? it solves all such problems and is more efficient than Tomcat in pretty much any aspect. Redeploy and modularity for different versions of Hibernate (or anything else) come out of the box, including an high quality connection pool.
(Yes you might consider me biased as my employer also funds WildFly development, but it also funds Tomcat and I have no interest in selling you either one.. I just think Tomcat is rather outdated, especially in these areas you're looking at now)
Hey, it is very interesting to try WildFly, but my boss believes Tomcat is the best solution. I need time to make list of advantages (including test for memory leaks when hotdeploying), thats lots of time
As for your suggestions: I am sure
contextDestroyed is invoked, no threads are left, no leaked ThreadLocals. I don't use third party connection pool just to minify example (c3p0 may be leaking too). The other advices I'll try someday, but I don't believe they will help freeing classloader.
Quote:
but looking at static constants won't help
but that may be a reason for a leak? Static field INSTANCE holds a hard reference to class, so the class will not be unloaded until we nullify that INSTANCE. It is also
final, so we cannot do anything to that class - it will free permgen space only when classloader is destroyed (e.g, tomcat restart).