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.


Field Summary
 
Fields inherited from interface com.adobe.idp.dsc.transaction.TransactionDefinition
PROPAGATION_MANDATORY, PROPAGATION_NEVER, PROPAGATION_NOT_SUPPORTED, PROPAGATION_REQUIRED, PROPAGATION_REQUIRES_NEW, PROPAGATION_SUPPORTS, TIMEOUT_DEFAULT
 
Method Summary
 java.lang.Object execute(TransactionCallback aCallback)
          Executes the action specified by the given callback object within a transaction.
 
Methods inherited from interface com.adobe.idp.dsc.transaction.TransactionDefinition
getName, getPropagationType, getTimeout, setPropagationType, setTimeout
 

Method Detail

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