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.