safe « Session « JPA Q&A





1. is hibernate's session thread safe    stackoverflow.com

i need to know, whether the hibernate's session is thread safe or not. But obvious a new session is attached to every thread for execution. But my question is if in ...

3. Hibernate session thread safety issue    coderanch.com

Hi, I have a class with 10 methods. Each method gets an hibernate session to execute a query. Instead of creating hibernate session in each method can i have a class variable for hibernate session and use it in all the methods? Is it going to cause any thread-safety issues? Thanks, Srikanth.

4. Session, and thread-safety in webapps with ThreadLocal    forum.hibernate.org

Hello, While testing my webapp with Jmeter I realized my app has thread-safety issues, because of how I use Hibernate Session. I use the 'open in Servlet Filter, put in ThreadLocal, assign to User, execute, close in Filter' approach. The point is that each user has its own Session. Multiple users can access the app simultaneously - there are no thread ...

5. session-per-http-session is thread safe?    forum.hibernate.org

i've read some articles about using long term hibernate session and disconnect() at end of each http request. But is this thread safe? if client sends two request using same httpsessionid (e.g. user opens two browser window), there is racing condition in sharing the hibernate session. According to doc, hibernate session is not thread safe.

6. Session thread safety question    forum.hibernate.org