Most of the memory being used will be tomcat, hanging on to jars: tomcat loads pretty much everything at startup, for better performance.
Hibernate itself will keep a fair chunk of memory for the lifespan of the app: the session factory, all the objects created when hibernate parsed the .cfg.xml and .hbm.xml files, and so forth. Nothing phenomenal, though.
If you're worried about it, get a profiler and see what's hanging onto all that memory. There are several out there, search for "java memory profiler" in your favourite web search engine.
BTW, I don't think you need to specify the NoCacheProvider to turn of disc caching. The "approved" properties controlling that are hibernate.cache.use_query_cache and hibernate.cache.use_second_level_cache: set them both to false.
_________________ Code tags are your friend. Know them and use them.
|