Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ITransactionSynchronization.BeforeCommit Method

Invoked before transaction commit (before BeforeCompletion) Can e.g. flush transactional O/R Mapping sessions to the database

[Visual Basic]
Public Sub BeforeCommit( _
   ByVal readOnly As Boolean _
void BeforeCommit(
   bool readOnly


If the transaction is defined as a read-only transaction.


This callback does not mean that the transaction will actually be commited. A rollback decision can still occur after this method has been called. This callback is rather meant to perform work that's only relevant if a commit still has a chance to happen, such as flushing SQL statements to the database.

Note that exceptions will get propagated to the commit caller and cause a rollback of the transaction.

(note: do not throw TransactionException subclasses here!)

See Also

ITransactionSynchronization Interface | Spring.Transaction.Support Namespace