title: Spring too high memory usage
body: <p>I have a webapp that combines Spring + Hibernate. I deploy this locally in a Tomcat Server and I get memory consumptions of around 150-200 Mb which to my knowledge is not that high at all. But apparently in production deployment, which works over WebSphere, I am getting 500Mb of memory usage, and a very high frequency of garbage collection.</p>
  
  <p>At first I blamed Hibernate for the problem (as seen in <a href="https://stackoverflow.com/questions/21435250/high-gc-load-using-hibernate?noredirect=1#comment32350748_21435250">this other question</a>) but now I am lost as to what might be causing this apparent high usage. </p>
  
  <p>I tried profiling my app using MAT and these are my histogram results:</p>
  
  <p><img src="https://i.stack.imgur.com/NrkWF.png" alt="Histogram">
  <img src="https://i.stack.imgur.com/khVtR.png" alt="Dominator tree"></p>
  
  <p>I haven't got much experience at profiling memory and most of the time I feel as if I was looking at the car's engine after a failure, but it seems to me that the char[] references are related to spring's internal "database" of beans. I use annotation based configuration for spring's mvc components and transactions:</p>
  
  <pre><code>&lt;tx:annotation-driven /&gt;
  &lt;context:annotation-config /&gt;
  </code></pre>
  
  <p>Do you find any of these values to be exceptionally high? Can you help me tracing the problem up?</p>
  
  <p>PS. this is my dominator for a heap dump nearer to a full heap
  <img src="https://i.stack.imgur.com/YDv7I.png" alt="enter image description here"></p>