-->
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.  [ 5 posts ] 
Author Message
 Post subject: how to disable hibernate session cache
PostPosted: Wed Oct 19, 2005 12:48 am 
Newbie

Joined: Mon Oct 17, 2005 10:08 pm
Posts: 3
Need help with Hibernate? Read this first:
as I got fussy dealing with hibernate session ,so I wanna disable hibernate session cache function.
Can anybody tell me how to config it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 19, 2005 1:14 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider
hibernate.cache.use_second_level_cache=false
hibernate.cache.use_query_cache=false

you can put these in hibernate.cfg.xml or the .propertis file.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 19, 2005 3:12 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
When using hibernate 3.1 you could
use the stateless session.
But be aware that it is missing a lot of features.


Top
 Profile  
 
 Post subject: Re: how to disable hibernate session cache
PostPosted: Wed Oct 19, 2005 4:47 am 
Newbie

Joined: Wed Oct 05, 2005 1:20 pm
Posts: 15
Location: Russia Izhevsk
heshufendf wrote:
Need help with Hibernate? Read this first:
as I got fussy dealing with hibernate session ,so I wanna disable hibernate session cache function.
Can anybody tell me how to config it.


If we say about first level session cache it cannot be turned off. But you can manage it using following methods:

1. session.evict(object)
2. session.contains(object)
3. Session.clear()

--
Andrey Grebnev
http://www.jroller.com/page/agrebnev


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 19, 2005 5:02 am 
Newbie

Joined: Mon Oct 17, 2005 10:08 pm
Posts: 3
Thanks to all of you :)
I have solved the problem.


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