title: Glassfish: exception trace cut
body: <p>I have a Struts action calling a chain of 3 EJB calls: the first one calls the second, which calls the third.</p>
  
  <p>The third EJB can throw a low-level <strong>checked exception</strong>, which the second EJB wraps in a <strong>runtime exception</strong> (<code>throw new RuntimeException(e);</code>), as it is simply unrecoverable.</p>
  
  <p>Now all the Struts action gets is <code>javax.ejb.EJBTransactionRolledbackException</code> caused by <code>javax.ejb.TransactionRolledbackLocalException</code>, the stack trace is cut after that (which means, having looked at <code>Throwable.printStackTrace()</code>, that the <code>TransactionRolledbackLocalException</code> has no cause set).</p>
  
  <p>Can I force Glassfish (v. 2.1.1) somehow to imprint the cause into this exception, so I can have a meaningful trace? Perhaps not to throw <code>RuntimeException</code>, but something more elaborate?</p>