Ok.... I think I have a couple of places where this memory could be leaking.
When I remove the async, this no longer appears in the heap dump. I dont have a @PreDestroy, but I wouldn't know what to put in that method anyhow. All I want is for my async method to run outside the main HTTPRequest thread so it doesn't slow up the response, and once that method is done (it only takes a second or so to run), then that is the end of that!... There is no cancelling anything.... Or is there something I do have to do to destroy the background thread that processes these async methods? Anyhow, as I say, this is only one of my permgen issues. After removing the async method, the application still didn't GC on redeploy. I tracked this down to using JAXRS. I made a very simple webapp that simply returns a java object serialised as JSON, in a get request. This GC's ok on redeploy. However, if I add the configuration according to adam-bien, http://www.adam-bien.com/roller/abien/entry/configuring_the_json_default_provider This stops it hot deploying, it appears that the JSONProvider doesn't GC, and this retains a reference to the JAXB class that is serialised to JSON...... -- View this message in context: http://tomee-openejb.979440.n4.nabble.com/Permgen-issue-tp4676065p4676080.html Sent from the TomEE Users mailing list archive at Nabble.com.
