-->
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: One second level cache for all SessionFactories?
PostPosted: Tue Aug 15, 2006 6:57 pm 
Newbie

Joined: Sun Apr 11, 2004 12:13 pm
Posts: 7
I just have a general question which I can't seem to find documentation for.

If you have multiple SessionFactories within an application (because you are connecting to multiple databases), is the entire second level cache cleared when any of the SessionFactories are closed?

It appears to be working that way in my application, and I just wanted to know if that is the intention before I spend more time trying to figure out what I'm doing wrong.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 16, 2006 1:08 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Each session factory will clear out its bit. However, its "bit" is defined as all cache regions prefixed with the value you've configured hibernate.cache.region_prefix to be. So in your various .cfg.xml files, set a different value for each region.

_________________
Code tags are your friend. Know them and use them.


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.