-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Intercept all Query objects before execution
PostPosted: Fri Nov 14, 2014 4:00 pm 
Newbie

Joined: Tue Nov 19, 2013 6:06 pm
Posts: 1
I currently use a default transaction isolation of READ_COMMITTED and I do not use optimistic (versioning) or pessimistic locking when writing data back to the database so I currently have a problem with lost updates.

I plan to use pessimistic locking, at least for now. I'm trying to find a way to intercept all Query objects generated by Hibernate before they are executed, in order to change the LockMode of any queries executed in a non-read-only transaction to use pessimistic locking. I'm aware of the hibernate interceptor API, but that does not give access to Query objects before execution, and I have not been able to find any other way to get access to Query objects before execution. Any help pointing me in the right direction is appreciated!

Thanks,
Ryan


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.