Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ITransactionOperations.Execute(ITransactionCallback) Method

Executes the action specified by the given callback object within a transaction.

[Visual Basic]
Public Sub Execute( _
   ByVal action As ITransactionCallback _
)
[C#]
object Execute(
   ITransactionCallback action
);

Parameters

action
The callback object that specifies the transactional action.

Return Value

A result object returned by the callback, or

null
if one

Remarks

Allows for returning a result object created within the transaction, that is, a domain object or a collection of domain objects. An exception thrown by the callback is treated as a fatal exception that enforces a rollback. Such an exception gets propagated to the caller of the template.

Exceptions

Exception Type Condition
TransactionException In case of initialization or system errors.

See Also

ITransactionOperations Interface | Spring.Transaction.Support Namespace | ITransactionOperations.Execute Overload List