-->
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.  [ 2 posts ] 
Author Message
 Post subject: Dynamic parameter setting for mappings.
PostPosted: Wed Jan 05, 2005 3:47 pm 
Newbie

Joined: Wed Jan 05, 2005 3:41 pm
Posts: 1
Greetings.

We have a certain domain object (system configuration) that should be used in read-only mode from the ordering application (no one should be allowed to change the configuration, only order them), but should be used in the read/write mode from the application that administers these configurations. Is there a way to accomplish this without duplicating the mapping file and just setting different caching parameters?

Basically the mapping file is exactly the same, except the one for the ordering app should have <cache usage="read-only"/> and the one for the admin app should not.

Also, how does hibernate deal with multiple mapping files found in the classpath?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 4:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Go in and set that flag via the Configuration API. (done on the Configuration object before calling buildSessionFactory)

How we deal with multiple mapping files found in the classpath (here I assume duplicate paths to the same resource)? The same as anything else that looks up resources via a classpath - the first found wins.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.