-->
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: setting mutable property programmatically
PostPosted: Mon Apr 26, 2004 5:40 pm 
Regular
Regular

Joined: Fri Aug 29, 2003 12:48 pm
Posts: 63
Hi guys. I've got a bunch of hibernate objects in my object graph that I want treated and cached as read-only when running in my webapp, but not when running in my command-line admin suite. Rather than maintain two sets of mapping files, I'm programmatically modifying the Configuration object in the webapp context to enable read-only caches for that portion of my objec graph. E.g.:

Code:
config.setCacheConcurrencyStrategy(Study.class, new ReadOnlyCache());


Questions arise:

1. Is this a good strategy for this use case? Any other best practices?

2. How to I programatically tell the Configuration that a class is immutable?


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.