-->
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.  [ 3 posts ] 
Author Message
 Post subject: Optimistic JBossCache and Entities with out a Version
PostPosted: Fri Dec 07, 2007 6:49 pm 
Regular
Regular

Joined: Thu Aug 26, 2004 9:23 pm
Posts: 71
Looking at the code in OptimisticTreeCache it appears that Hibernate tells JBossCache to use an entity's version column for the cache's optimistic check if it has one.

However, if the entity doesn't have a version column it appears JBossCache doesn't do a version check of any kind when updating the cache. (Last update wins)

So, theoretically if I am using OptimisticeTreeCache with a Hibernate entity that don't contain a version column will my cache and DB remain synchronized? Is there any possible concurrent modification scenario where the 2 could become out of sync? I don't care if concurrent changes step on each other as long as the cache and the db remain synchronized.

Mike


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 10, 2007 5:09 pm 
Regular
Regular

Joined: Thu Aug 26, 2004 9:23 pm
Posts: 71
Bump?

In order to properly utilize an optimistic JBossCache do I need to make all of my hibernate entities versioned (@Version)?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 17, 2007 5:30 pm 
Regular
Regular

Joined: Thu Aug 26, 2004 9:23 pm
Posts: 71
Bump again.

Can I safely use OptimisticTreeCache with entities that don't have a @Version?


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

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.