Interface TransactionCallback

All Known Implementing Classes:

public interface TransactionCallback

This is a callback interface for transactional code. A transaction callback is expected to be used with TransactionTemplate.execute(). Typically, the transaction callback is implemented as an anonymous class.

Method Summary
 java.lang.Object doInTransaction(TransactionContext aTxCtx)
          This method is called by TransactionTemplate.execute().

Method Detail


java.lang.Object doInTransaction(TransactionContext aTxCtx)
                                 throws com.adobe.idp.dsc.DSCException
This method is called by TransactionTemplate.execute(). within a transactional context. It does not require information about the transactions themselves, although it can retrieve and influence the status of the current transaction through the given status object, by setting rollback-only.

It allows for returning a result object created within the transaction, meaning a domain object or a collection of domain objects. A runtime exception thrown by the callback is treated as application exception that enforces a rollback. An exception is propagated to the caller of the template.

aTxCtx - The associated transaction context.
A result object.
See Also:

[an error occurred while processing this directive] [an error occurred while processing this directive]