1 22 package org.jboss.tm; 23 24 import java.io.PrintStream ; 25 import java.io.PrintWriter ; 26 import javax.ejb.TransactionRolledbackLocalException ; 27 import javax.transaction.RollbackException ; 28 import org.jboss.util.NestedThrowable; 29 30 38 public class JBossTransactionRolledbackLocalException 39 extends TransactionRolledbackLocalException 40 implements NestedThrowable 41 { 42 public JBossTransactionRolledbackLocalException() 43 { 44 super(); 45 } 46 47 public JBossTransactionRolledbackLocalException(final Exception e) 48 { 49 super(null, e); 50 } 51 52 public JBossTransactionRolledbackLocalException(final String message) 53 { 54 super(message); 55 } 56 57 public JBossTransactionRolledbackLocalException(final String message, final Exception e) 58 { 59 super(message, e); 60 } 61 62 64 public Throwable getNested() 65 { 66 return getCausedByException(); 67 } 68 69 public Throwable getCause() 70 { 71 return getCausedByException(); 72 } 73 74 79 public String getMessage() { 80 return NestedThrowable.Util.getMessage(super.getMessage(), getCausedByException()); 81 } 82 83 89 public void printStackTrace(final PrintStream stream) 90 { 91 if (getCausedByException() == null || NestedThrowable.PARENT_TRACE_ENABLED) 92 { 93 super.printStackTrace(stream); 94 } 95 NestedThrowable.Util.print(getCausedByException(), stream); 96 } 97 98 104 public void printStackTrace(final PrintWriter writer) 105 { 106 if (getCausedByException() == null || NestedThrowable.PARENT_TRACE_ENABLED) 107 { 108 super.printStackTrace(writer); 109 } 110 NestedThrowable.Util.print(getCausedByException(), writer); 111 } 112 113 117 public void printStackTrace() 118 { 119 printStackTrace(System.err); 120 } 121 122 } | Popular Tags |