I am using Hibernate 2.6 with hibernate-entitymanager. I am trying to catch and handle situations when 2 transactions conflict on an object. Here is what happens:
Two threads are updating a single object wich has a @Version field. The thread which looses commit race logs StaleObjectStateException on flush. The exception is not thrown, i...
Hi
I'm using Session per Request pattern. Transactions are managed automatically.
How can I easily handle StaleObjectStateException and show some specific view?
...
Is it possible to get a StaleObjectStateException with Hibernate when you do the same query twice inside one tx if the result data of that query gets changed by a concurrent update inside a different session between the first and the second query?
I am using optimistic concurrency control on all entities in this scenario.
So it looks l...
Hi all,
I'm struggling with a Grails service.
The service gets AJAX calls from the clients and behaves like a simple local cache for remote objects:
void **someCallFromClient**() {
// extract params
def results = remoteService.queryService(params)
results.each{
// try to fetch result object from local DB
def obj = Some...
I am getting this exception in a controller of a web application based on spring framework using hibernate. I have tried many ways to counter this but could not resolve it.
In the controller's method, handleRequestInternal, there are calls made to the database mainly for 'read', unless its a submit action.
I have been using, Spring's S...