-
Apr 5th, 2011, 08:55 AM
#1
Long running Hibernate Session
Hi everyone,
I wondered whether it was possible to keep the Hibernate Session opened over several HTTP request (AKA a conversation).
My app is architected like this:
- Swing UI
- Spring HTTP Invoker RPC on Tomcat
- Bitronix JTA TM
- Hibernate ORM with EHCache for L2
At the moment, each HTTP Invoker request opens an Hibernate Session + Bitronix Transaction. I have performances issues related to the fact that when the user stays on the same screen to modify the same object graph, this object graph is reloaded again and again. Level 2 cache is activated and helpful but brings other drawbacks.
By scenario would be:
- Begin Session
- Begin Transaction
- Load data
- Merge data
- End Transaction
- Begin Transaction
- Merge data
- End Transaction
- Begin Transaction
- Merge data
- End Transaction
- End Session
Instead of
- Begin Session
- Begin Transaction
- Load data
- Mergedata
- End Transaction
- End Session
- Begin Session
- Begin Transaction
- Load data
- Mergedata
- End Transaction
- End Session
- Begin Session
- Begin Transaction
- Load data
- Mergedata
- End Transaction
- End Session
Thanks for your help and advice.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules