I seem to be having a memory leak issue when using spring, hibernate, and tiles for my webapp. I think this might be caused by my application not cleaning up after itself between deployments. I deploy and undeploy a lot, since I'm currently just learning all of these frameworks.
What kind of things should I be doing to cleanup in my web application? I currently do nothing because I thought Java automatically did memory cleaning, however I'm pretty sure it doesn't do everything when it comes to spring since tomcat keeps complaining about permgen memory.
I'm confused as to whether or not I need to be running certain methods in order to keep things clean. I read about a spring hook that registers the application somewhere, then when it shuts down the application is cleaned up properly? I wasn't sure if something like that was necessary though in the new version of spring (3.1)
For example, tomcat keeps telling me that I'm not properly unregistering the JDBC driver (however I think tomcat does this automatically if it is detected).
I understand this is a hugely vague question, but if someone could mention certain things that need to be done to keep my application from leaking, I can google for them myself.
Thanks!