Clarify TransactionCallback Javadoc

Issue: SPR-8390

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4554 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Chris Beams 2011-06-15 13:04:07 +00:00
parent d9f6dcf6b4
commit ca3d9a55d9
2 changed files with 6 additions and 3 deletions

View File

@ -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<T> {
* <p>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 <code>null</code>

View File

@ -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 <code>null</code> if none
* @throws TransactionException in case of initialization, rollback, or system errors
* @throws RuntimeException if thrown by the TransactionCallback
*/
<T> T execute(TransactionCallback<T> action) throws TransactionException;