TransactionScope + IPostUpdateEventListener

Description

IPostUpdateEventListener doesn't seem to fire if a transactionscope transaction is used for a persistent entity.

Environment

None

Attachments

1

Activity

Frédéric Delaporte 
June 29, 2017 at 6:23 PM

Extracted from the patch, the test case is

This has not a single chance to work. The session can auto-enlist itself with a transaction scope only if some interaction with the session has been made during the lifetime of the transaction scope. This is not the case here for the second scope. Only modifying an entity does not trigger any kind of interaction with the session. So the session is unaware of this second scope, and does not get flushed from its completion.

Adding an explicit flush in the second scope "solves" the issue.

I think we should close this as "not an issue", as designed.

Oskar Berggren 
September 16, 2012 at 8:43 PM

Possibly related to NH-2176, since the test case in the patch do use multiple consecutive transaction scopes on the same session.

Not an Issue

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created August 14, 2011 at 2:37 PM
Updated July 10, 2017 at 12:41 PM
Resolved July 10, 2017 at 12:41 PM
Who's Looking?