| You are monitoring the Java process memory size, which is interesting but doesn't really give Java level details. It would be more interesting if you generate a Java heap dump and examine that with a tool like the Eclipse Memory Analyzer Tool. I don't really understand what the difference is between using a single jar and separate jars that leads to increased memory use as you open/close the entitymanagerfactory in a loop. I'm guessing that there is no real difference except the Java process memory is increasing. +1 for closing the JarInputStreams, but your patch reformatted more lines than needed. |