Hibernate Team |
|
Joined: Tue Aug 26, 2003 7:19 pm Posts: 2364 Location: Brisbane, Australia
|
Create a session for each unit-of-work thus each method will load the object in its own session (and hence its own session cache) so there is no effect as they are separate from each other. Please note that the session is not thread safe. So if we are talking about 5 threads running through the same, say DAO, methods then each should have there own session, either on the stack or in a thread local. They are separate and cannot see whats in the other local instances of the session object's cache.
|
|