Hi to all, Well i am reading hibernate 3.2.2 tutorial. Going through these web pages i came to know that we should use session as "Thread Bound Programming" that means one session per thread. But when i was going through 1.3.3(Working the association), there is concept of detached objects and hence session opened and closed twice as per requirement. I want to know is it again one session per thread or what?
Yup, even though you're opening and closing Sessions, you still have the Hibernate Session itself bound to the thread, or ThreadLocal context.
That means when we close a hibernate session, the session is not kept in the threadLocal with threadSession.set(null); , or I misunderstand something... [ October 28, 2008: Message edited by: ntumba lobo ]