Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

DefaultTransactionAttribute.RollbackOn Method

Decides if rollback is required for the supplied exception.

[Visual Basic]
Public Overridable Sub RollbackOn( _
   ByVal exception As Exception _
) _
    Implements ITransactionAttribute.RollbackOn
[C#]
public virtual bool RollbackOn(
   Exception exception
);

Parameters

exception
The Exception to evaluate.

Return Value

True if the exception causes a rollback, false otherwise.

Implements

ITransactionAttribute.RollbackOn

Remarks

The default behavior is to rollback on any exception. Consistent with TransactionTemplate's behavior.

See Also

DefaultTransactionAttribute Class | Spring.Transaction.Interceptor Namespace