To Johh:
I have tried both ThreadStaticSessionContext and CallSessionContext
and get the same behavior with each. FYI, I am using a fluent
configuration so there is no actual entry in the app config. The
relevant lines of code look like this:
public ISessionFactory GetSessionFactory()
{
var persistenceModel = new PersistenceModel();
foreach (var assembly in GetAssembliesToLoadMappingsFrom())
persistenceModel.AddMappingsFromAssembly(assembly);
var configuration = Fluently.Configure()
.Database(GetDatabaseConfiguration()).BuildConfiguration();
persistenceModel.Configure(configuration);
configuration.SetProperty("current_session_context_class",
"call");
//configuration.SetProperty("current_session_context_class",
"thread_static");
return configuration.BuildSessionFactory();
}
To Fabio:
We are in fact using a conversation based approach but that does not
really apply here. The use case in question is one of an import from
a csv file. The Entry objects being saved are all new transient
entities. So it is appropriate to open a session, open a transaction,
save the entities and commit, as that is the entire unit of work.
All:
Sorry, I was out three days on Jury duty, but does anyone have any
insights into what might be going on here? Otherwise I will continue
to dig into this on my own.
--Ken
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.