title: Java - shutting down on Out of Memory Error
body: <p>I've heard very contradictory things on how to best handle this, and am stuck with the following dilemma:</p>
  
  <ul>
  <li>an OOME brings down a thread, but not the whole application</li>
  <li>and I need to bring down the whole application but can't because the thread doesn't have any memory left</li>
  </ul>
  
  <p>I've always understood best practice is let them go so the JVM can die because the JVM is in an inconsistent state at that point, but that doesn't seem to be working here.</p>