polishing

This commit is contained in:
Juergen Hoeller 2011-10-11 01:13:41 +00:00
parent 1f89243361
commit e58a45bff7
1 changed files with 4 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2010 the original author or authors. * Copyright 2002-2011 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -847,15 +847,13 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
else if (status.hasTransaction()) { else if (status.hasTransaction()) {
if (status.isLocalRollbackOnly() || isGlobalRollbackOnParticipationFailure()) { if (status.isLocalRollbackOnly() || isGlobalRollbackOnParticipationFailure()) {
if (status.isDebug()) { if (status.isDebug()) {
logger.debug( logger.debug("Participating transaction failed - marking existing transaction as rollback-only");
"Participating transaction failed - marking existing transaction as rollback-only");
} }
doSetRollbackOnly(status); doSetRollbackOnly(status);
} }
else { else {
if (status.isDebug()) { if (status.isDebug()) {
logger.debug( logger.debug("Participating transaction failed - letting transaction originator decide on rollback");
"Participating transaction failed - letting transaction originator decide on rollback");
} }
} }
} }
@ -885,8 +883,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
* @throws TransactionException in case of rollback failure * @throws TransactionException in case of rollback failure
* @see #doRollback * @see #doRollback
*/ */
private void doRollbackOnCommitException(DefaultTransactionStatus status, Throwable ex) private void doRollbackOnCommitException(DefaultTransactionStatus status, Throwable ex) throws TransactionException {
throws TransactionException {
try { try {
if (status.isNewTransaction()) { if (status.isNewTransaction()) {
if (status.isDebug()) { if (status.isDebug()) {