title: Java Security Manager - What does it check?
body: <p>This <a href="http://www.javaworld.com/javaworld/jw-05-1997/jw-05-security.html?page=2" rel="noreferrer">article</a> about Java security says:</p>
  
  <blockquote>
    <p>Code in the Java library consults the
    Security Manager whenever a dangerous
    operation is about to be attempted.</p>
  </blockquote>
  
  <p>So, what does this exactly mean? Say, if I've implemented my own securitymanager and enabled it for the whole JVM. Now, does the java runtime consults my securitymanager for each and every java call(like System.out.println() etc) or it consults only for <code>dangerous</code> api calls like System.exit() ,file operations etc?</p>
  
  <p><strong>edit</strong>: let me clarify my question,</p>
  
  <p>I'm not questioning the possiblities of the securitymanager. I'm just asking if the security checks are done for the <strong>dangerous api's alone</strong> or it is <strong>done for each and every method call</strong>. Which inturn causes a huge performance degradation in case of applications with large amounts of code.</p>