-->
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: read-only cache conundrum
PostPosted: Fri Nov 05, 2004 6:24 am 
Newbie

Joined: Thu Feb 26, 2004 7:29 am
Posts: 17
hi all,
i'm using jboss 3.2.3 and hibernate 2.1.2.
the application i'm developing has 40+ hibernate objects of which 75% of them are mostly config and rarely change.
i'm using jboss tree cache and have a question regarding the different cache strategies i can use.

my hibernate objects can be divided between runtime and config. the runtime objects (25%) are using the 'transactional' cache usage strategy and i would like to use the 'read-only' strategy for the config objects.

however, as mentioned above that while the config objects change rarely they can be changed via a management ui. from the limited tests i've done with the read-only cache this doesn't seem possible as the cache will prevent updates to these config objects.
i would prefer to use the 'read-only' strategy due to the performance edge over the 'transacitonal' strategy but as far as i can tell this means i would have to shut down my application to change the 'config' objects if i proceed with the 'read-only' strategy, (or have i completely missed something here??)

obviously, this is not the most desirable solution. i realise i'm probably asking for the impossible but just wanted to know if any of ye know a more elegant soluion to this problem.

thanks in advance,
colum.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 05, 2004 12:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
You have not missed anything. read-only *means* read-only.

Another option might be something where your admin UI does not update these mapped objects. Either they directly modify the db data through jdbc or through seperate mappings for the same objects. Then after update, you could just manually evict that particular cache region from within your non-admin app. This way you can still use the read-only concurrency strategy in your non-admin app (read-only caches can be evicted/cleared).


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 05, 2004 12:13 pm 
Newbie

Joined: Thu Feb 26, 2004 7:29 am
Posts: 17
cheers,
that is exactly the solution i need.
should have thaught of the evict instead of restarting the apps. ;-)
colum.


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.