Polishing

This commit is contained in:
Juergen Hoeller
2016-04-12 16:03:57 +02:00
parent 831f09cf48
commit 74608e6b49
12 changed files with 43 additions and 65 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -46,19 +46,16 @@ public interface ConnectionCallback<T> {
* Gets called by {@code CciTemplate.execute} with an active CCI Connection.
* Does not need to care about activating or closing the Connection, or handling
* transactions.
*
* <p>If called without a thread-bound CCI transaction (initiated by
* CciLocalTransactionManager), the code will simply get executed on the CCI
* Connection with its transactional semantics. If CciTemplate is configured
* to use a JTA-aware ConnectionFactory, the CCI Connection and thus the callback
* code will be transactional if a JTA transaction is active.
*
* <p>Allows for returning a result object created within the callback, i.e.
* a domain object or a collection of domain objects. Note that there's special
* support for single step actions: see the {@code CciTemplate.execute}
* variants. A thrown RuntimeException is treated as application exception:
* it gets propagated to the caller of the template.
*
* @param connection active CCI Connection
* @param connectionFactory the CCI ConnectionFactory that the Connection was
* created with (gives access to RecordFactory and ResourceAdapterMetaData)

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -47,19 +47,16 @@ public interface InteractionCallback<T> {
* Gets called by {@code CciTemplate.execute} with an active CCI Interaction.
* Does not need to care about activating or closing the Interaction, or
* handling transactions.
*
* <p>If called without a thread-bound CCI transaction (initiated by
* CciLocalTransactionManager), the code will simply get executed on the CCI
* Interaction with its transactional semantics. If CciTemplate is configured
* to use a JTA-aware ConnectionFactory, the CCI Interaction and thus the callback
* code will be transactional if a JTA transaction is active.
*
* <p>Allows for returning a result object created within the callback, i.e.
* a domain object or a collection of domain objects. Note that there's special
* support for single step actions: see the {@code CciTemplate.execute}
* variants. A thrown RuntimeException is treated as application exception:
* it gets propagated to the caller of the template.
*
* @param interaction active CCI Interaction
* @param connectionFactory the CCI ConnectionFactory that the Connection was
* created with (gives access to RecordFactory and ResourceAdapterMetaData)

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 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.
@@ -36,17 +36,14 @@ public interface TransactionCallback<T> {
/**
* Gets called by {@link TransactionTemplate#execute} within a transactional context.
* Does not need to care about transactions itself, although it can retrieve
* and influence the status of the current transaction via the given status
* object, e.g. setting rollback-only.
*
* <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.
* 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.
*
* Does not need to care about transactions itself, although it can retrieve and
* influence the status of the current transaction via the given status object,
* e.g. setting rollback-only.
* <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. 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}
* @see TransactionTemplate#execute