Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

SpringSessionSynchronization.BeforeCompletion Method

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

[Visual Basic]
Public Overrides Sub BeforeCompletion() _
    Implements ITransactionSynchronization.BeforeCompletion
public override void BeforeCompletion();




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

SpringSessionSynchronization Class | Spring.Data.NHibernate Namespace