-->
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: Upgrade Locking when using Transactional 2nd Level Cache
PostPosted: Mon Jul 28, 2008 6:56 am 
Newbie

Joined: Mon Jul 28, 2008 6:08 am
Posts: 1
I'm trying to figure out whether, or how, I can get Hibernate to acquire an UPGRADE, or WRITE, lock on an entity cached in a transactional 2nd-level cache such as JBoss TreeCache, when I use Session.get or Session.load.

Digging inside the code it seems that, by default, Hibernate effectively ignores all LockMode values when the 2-level cache strategy in affect is TRANSACTIONAL (no lock is acquired either in the database or the cache).

Some transactional cache implementations such as IBM eXtreme Scale product do support a getForUpdate() operation which acquires an UPGRADE lock.

One option might be to override the default EntityPersister to use my own implementation of TransactionalCache.


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.