C# Class Spring.Transaction.Support.TransactionCallbackWithoutResult

Simple convenience class for TransactionCallback implementation. Allows for implementing a DoInTransaction version without result, i.e. without the need for a return statement.
Inheritance: ITransactionCallback
Datei anzeigen Open project: spring-projects/spring-net

Public Methods

Method Description
DoInTransaction ( ITransactionStatus status ) : object

Gets called by TransactionTemplate.Execute within a transaction context.

DoInTransactionWithoutResult ( ITransactionStatus status ) : void

Gets called by TransactionTemplate.execute within a transactional context when no return value is required.

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. 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.

Method Details

DoInTransaction() public method

Gets called by TransactionTemplate.Execute within a transaction context.
public DoInTransaction ( ITransactionStatus status ) : object
status ITransactionStatus The associated transaction status.
return object

DoInTransactionWithoutResult() public abstract method

Gets called by TransactionTemplate.execute within a transactional context when no return value is required.
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. 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.
public abstract DoInTransactionWithoutResult ( ITransactionStatus status ) : void
status ITransactionStatus The status.
return void