1 28 29 package com.caucho.transaction; 30 31 import javax.transaction.RollbackException ; 32 33 public class RollbackExceptionWrapper extends RollbackException { 34 private Throwable _rootCause; 35 36 public RollbackExceptionWrapper(String message) 37 { 38 super(message); 39 } 40 41 public RollbackExceptionWrapper(String message, Throwable e) 42 { 43 super(message); 44 45 _rootCause = e; 46 } 47 48 public RollbackExceptionWrapper(Throwable e) 49 { 50 super(String.valueOf(e)); 51 52 _rootCause = e; 53 } 54 55 public static RollbackExceptionWrapper create(Throwable e) 56 { 57 if (e instanceof RollbackExceptionWrapper) 58 return (RollbackExceptionWrapper) e; 59 else 60 return new RollbackExceptionWrapper(e); 61 } 62 63 public Throwable getCause() 64 { 65 return _rootCause; 66 } 67 } 68 | Popular Tags |