1 16 17 package org.springframework.aop.framework.autoproxy.metadata; 18 19 import org.springframework.transaction.interceptor.TransactionInterceptor; 20 21 22 32 public class TxClassWithClassAttribute { 33 34 35 public int inheritClassTxAttribute(int i) { 36 return i; 37 } 38 39 44 public void rollbackOnly(boolean rollbackOnly) { 45 if (rollbackOnly) { 46 setRollbackOnly(); 47 } 48 } 49 50 53 protected void setRollbackOnly() { 54 TransactionInterceptor.currentTransactionStatus().setRollbackOnly(); 55 } 56 57 62 public void echoException(Exception ex) throws Exception { 63 if (ex != null) 64 throw ex; 65 } 66 67 } 68 | Popular Tags |