From: Juergen H. <jho...@us...> - 2006-04-21 00:14:28
|
Update of /cvsroot/springframework/spring/src/org/springframework/transaction/interceptor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19629/src/org/springframework/transaction/interceptor Modified Files: Tag: mbranch-1-2 TransactionAspectSupport.java Log Message: backported fixes and enhancements from 2.0 M4 (HEAD) Index: TransactionAspectSupport.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/transaction/interceptor/TransactionAspectSupport.java,v retrieving revision 1.18 retrieving revision 1.18.2.1 diff -C2 -d -r1.18 -r1.18.2.1 *** TransactionAspectSupport.java 7 Nov 2005 20:34:06 -0000 1.18 --- TransactionAspectSupport.java 21 Apr 2006 00:13:50 -0000 1.18.2.1 *************** *** 1,4 **** /* ! * Copyright 2002-2005 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); --- 1,4 ---- /* ! * Copyright 2002-2006 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); *************** *** 63,73 **** /** ! * Holder to support the currentTransactionStatus() method, and communication ! * between different cooperating advices (e.g. before and after advice) ! * if the aspect involves more than a single method (as will be the case for ! * around advice). */ private static ThreadLocal currentTransactionInfo = new ThreadLocal(); /** * Return the transaction status of the current method invocation. --- 63,74 ---- /** ! * Holder to support the <code>currentTransactionStatus()</code> method, ! * and to support communication between different cooperating advices ! * (e.g. before and after advice) if the aspect involves more than a ! * single method (as will be the case for around advice). */ private static ThreadLocal currentTransactionInfo = new ThreadLocal(); + /** * Return the transaction status of the current method invocation. *************** *** 294,304 **** } else { ! // we don't roll back on this exception if (logger.isDebugEnabled()) { logger.debug(txInfo.joinpointIdentification() + " threw throwable [" + ex + "] but this does not force transaction rollback"); } ! // will still roll back if TransactionStatus.rollbackOnly is true ! this.transactionManager.commit(txInfo.getTransactionStatus()); } } --- 295,315 ---- } else { ! // We don't roll back on this exception. if (logger.isDebugEnabled()) { logger.debug(txInfo.joinpointIdentification() + " threw throwable [" + ex + "] but this does not force transaction rollback"); } ! // Will still roll back if TransactionStatus.isRollbackOnly() is true. ! try { ! this.transactionManager.commit(txInfo.getTransactionStatus()); ! } ! catch (RuntimeException ex2) { ! logger.error("Application exception overridden by commit exception", ex); ! throw ex2; ! } ! catch (Error err) { ! logger.error("Application exception overridden by commit error", ex); ! throw err; ! } } } |