Hibernate version: 3.2
Hi,
I have an application which loads all objects of a graph in memory at startup and then can run indefinitely always using the in-memory objects. When the application receives messages from other applications, it starts a transaction and performs graph traversals and calculations. At the end, it has a list of changed objects and does an update for these objects and then the transaction ends.
What I don't really understand is the session scope. I imagine that my session is limited to my transaction, therefore the session cache is created and destroyed each time my method starts and finishes. Therefore, the session cache doesn't really do me any good and my objects are detached almost all of the time. This is ok with me, but it's important to understand so that I don't think about using the automatic dirty detection.
Even the second-level cache is limited to the scope of the transaction, so I can't really use the caches at all it seems.
Can anyone confirm or refute this for me?
thanks
|