Thread « Load « JPA Q&A





1. Thread and load balance safe "create if not exists"    forum.hibernate.org

Hello, We are using Spring and Hibernate and we are having problem with implementing a quite simple algorithm so that it is thread safe and also load-balancing safe. This is the algorithm: 1. Read a record 2. If record does not exist: 2a. Execute a business logic 2b. Create the record Alternate algorithm that would also work for us: 1. Read ...

2. multiple thread/sessions and lazy load    forum.hibernate.org

5. Thread safety and lazy loading    forum.hibernate.org

Using hibernate 3.1. I know that Session instances are not thread safe. However would it be save to load objects in a single thread, and then access these objects in multiple threads, given the fact that accessing these objects will trigger lazy loading? I.e. the question is if lazy loading itself is thread safe, if internally it uses a single session? ...

6. Multithreading + Illegal access to loading collection    forum.hibernate.org

Hello, So we've been using Hibernate (version 3.2.3) for our project and we're encountering a pretty annoying (but possibly "normal") issue. To make it simple, we have many 1--* relationships, like this: [ Parent ] 1 ---------- * [ Child ] These relationships are lazy, so that the collection of children associated with a parent is not fetched until one calls ...