com.adobe.idp.dsc.transaction
Interface TransactionTemplate
- All Superinterfaces:
- TransactionDefinition
public interface TransactionTemplate
- extends TransactionDefinition
This interface provides programmatic transaction demarcation
and transaction exception handling for service managed transactions.
Method Summary |
java.lang.Object |
execute(TransactionCallback aCallback)
Executes the action specified by the given callback object within a transaction. |
execute
java.lang.Object execute(TransactionCallback aCallback)
throws com.adobe.idp.dsc.DSCException
- Executes the action specified by the given callback object within a transaction.
It allows for returning a result object (a domain object or a collection of domain objects)
created within the transaction. A runtime exception thrown
by the callback is treated as an application exception that enforces a rollback.
An exception is propagated to the caller of the template.
- Parameters:
aCallback
- The callback object that specifies the transactional action.
- Returns:
- A result object or
null
.
- Throws:
TransactionException
- in case of initialization, rollback, or system errors.
com.adobe.idp.dsc.DSCException