Hi,
I have an Application context extending AbstractXmlApplicationContext, that contains Hibernate connection. I want to be able to release all the memory held by this proces. I call destroy(), and set the reference to null, but no luck. For illustration, running this block, causes my application to run out of memory.
It seems that some resources are not being released. Any tips on how to fully destroy the application context?Code:BootstrapClassPathXmlApplicationContext context; for (int i = 0; i < 1000; i++) { context = new BootstrapClassPathXmlApplicationContext( new String[] { "bootContext-migration.xml" }); context.destroy(); context = null; }
Thank you!


Reply With Quote