Hi,
Do i have to use threadlocal while using hibernate session? I've seen many articles which are using threadlocal while dealing with hibernate session but my understanding is that if i'm using factory.getCurrentSession(), we don't need threadlocal (unless there is some other specific requirement for threadlocal) because we'll always get the existing session if available otherwise it will create a new session. We might need threadlocal if we are dealing with entity manager. Is my understanding correct ?
-Pankaj
|