-->
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: How to enable second level cache only for a specific process
PostPosted: Mon Oct 10, 2005 1:17 pm 
Newbie

Joined: Mon Oct 10, 2005 1:07 pm
Posts: 13
Hi,

I know using second level cache for a specific class requires setting the cache startegy in the mapping file, e.g.:

Code:
<class name="eg.Immutable" mutable="false">
     <cache usage="read-only"/>
     ....
</class>


another option to do it is in <class-cache> and <collection-cache> elements in hibernate.cfg.xml.

the question: what if I want this class to be cahced only in a specific process? A restriction: All the processes use the same mapping files! How can I control the use of second level cache in runtime?


Hibernate version: 3.1

Thanks,
Moshe.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 10, 2005 11:38 pm 
Newbie

Joined: Wed Mar 30, 2005 8:58 am
Posts: 10
Location: São Paulo / Brazil
You could implement your own Cache Provider, and maybe control it from a JMX console? :)

It's just an idea.

_________________
www.brunoborges.com.br


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2005 8:57 am 
Newbie

Joined: Mon Oct 10, 2005 1:07 pm
Posts: 13
Hi,

I wouldn't like to do that... I was joping for some way to do it in configuration files...

Thanks anyway :-)


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.