I recently implemented a reporting model in my app (a windows service) and so now have two session factories to manage within a unit of work. Originally, I was using this setting:
<property name="current_session_context_class">thread_static</property>
This was causing the wrong session to get injected into my entities since only one session factory is supported with this setting. So I changed it to this:
<property name="current_session_context_class">call</property>
Now things work as expected. You don’t want to use this on ASP.NET.
Resources
Posted
10-24-2009 9:32 PM
by
Michael Nichols