Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AbstractPlatformTransactionManager.GetTransaction Method

Return a currently active transaction or create a new one.

[Visual Basic]
Public NotOverridable Sub GetTransaction( _
   ByVal definition As ITransactionDefinition _
) _
    Implements IPlatformTransactionManager.GetTransaction
[C#]
public ITransactionStatus GetTransaction(
   ITransactionDefinition definition
);

Parameters

definition
ITransactionDefinition instance (can be null for defaults), describing propagation behavior, isolation level, timeout etc.

Return Value

ITransactionStatus representing the new or current transaction.

Implements

IPlatformTransactionManager.GetTransaction

Remarks

This implementation handles propagation behavior.

Delegates to DoGetTransaction, IsExistingTransaction, and DoBegin.

Note that parameters like isolation level or timeout will only be applied to new transactions, and thus be ignored when participating in active ones. Furthermore, they aren't supported by every transaction manager: a proper implementation should throw an exception when custom values that it doesn't support are specified.

Exceptions

Exception Type Condition
TransactionException In case of lookup, creation, or system errors.

See Also

AbstractPlatformTransactionManager Class | Spring.Transaction.Support Namespace