Joined: Wed Aug 08, 2007 5:39 pm Posts: 2 Location: Atlanta, GA
|
Essentially, I want to be able to use the ISessionFactory.GetCurrentSession() method which will allow me to grab the "current" Session from anywhere in code for a given thread. From the docs, it seems by implementing the ICurrentSessionContext interface I can "bind/unbind" ISession instances to a context (thread) and register that interface via a configuration setting in my app.config via the "hibernate.current_session_context_class" parameter. My question is this fully implemented and thread-safe? From the source, it seems that only one instance of a ICurrentSessionContext is associated to a SessionFactory at run-time which doesn't seem to me to be thread-safe. Am I correct or am I missing something?
Thanks,
LC
|
|