title: EJB 3.0 exceptions handling
body: <p>A quote from the EJB specification:</p>
  
  <blockquote>
    <p>If the bean method encounters a system exception or error, it should
    simply propagate the error from the bean method to the container
    (i.e., the bean method does not have to catch the exception).</p>
  </blockquote>
  
  <p>But I don't understand it. Does it mean that I shouldn't catch all types of exceptions (i.e. try to catch <code>Exception</code> class) and rethrow it as my application exception?</p>
  
  <p>An example for more clarity:</p>
  
  <pre><code>public void beanMethod throws MyApplicationException {
    try {
      // do something
    } catch (Exception e) {
       throw new MyApplicationException(e); // Should I do it like this? 
    }
  }
  </code></pre>
  
  <p>Or is this not for EJB developers, but only for EJB reference-implementation developers (container developers): In the latter case, as a consequence, the container must not propagate system exceptions to my business method, and my <code>catch(Exception e)</code> block never  catches any system exception?</p>