diff --git a/org.springframework.transaction/src/main/java/org/springframework/transaction/support/TransactionCallback.java b/org.springframework.transaction/src/main/java/org/springframework/transaction/support/TransactionCallback.java index b725a9f3991..7b9ad5682f2 100644 --- a/org.springframework.transaction/src/main/java/org/springframework/transaction/support/TransactionCallback.java +++ b/org.springframework.transaction/src/main/java/org/springframework/transaction/support/TransactionCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,7 +43,9 @@ public interface TransactionCallback { *

Allows for returning a result object created within the transaction, i.e. * a domain object or a collection of domain objects. A RuntimeException thrown * by the callback is treated as application exception that enforces a rollback. - * An exception gets propagated to the caller of the template. + * Any such exception will be propagated to the caller of the template, unless + * there is a problem rolling back, in which case a TransactionException will be + * thrown. * * @param status associated transaction status * @return a result object, or null diff --git a/org.springframework.transaction/src/main/java/org/springframework/transaction/support/TransactionOperations.java b/org.springframework.transaction/src/main/java/org/springframework/transaction/support/TransactionOperations.java index 5a86a53bfcb..30abf4e4a56 100644 --- a/org.springframework.transaction/src/main/java/org/springframework/transaction/support/TransactionOperations.java +++ b/org.springframework.transaction/src/main/java/org/springframework/transaction/support/TransactionOperations.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2009 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,6 +38,7 @@ public interface TransactionOperations { * @param action the callback object that specifies the transactional action * @return a result object returned by the callback, or null if none * @throws TransactionException in case of initialization, rollback, or system errors + * @throws RuntimeException if thrown by the TransactionCallback */ T execute(TransactionCallback action) throws TransactionException;