-->
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: Hibernate --> OSCache Not working
PostPosted: Wed Aug 22, 2007 1:25 pm 
Newbie

Joined: Wed Aug 22, 2007 1:16 pm
Posts: 2
Location: Kansas USA
Hello:

I have currently configured Hibernate to use OSCache, with the following setttings in persistence.xml:

<property name="hibernate.ejb.classcache.com.test.TestClass" value="read-write"/>

<property name="hibernate.cache.provider_class" value="org.hibernate.cache.OSCacheProvider"/>
<property name="hibernate.cache.use_second_level_cache" value="true"/>


Howver, I noticed that the JDBC calls are still being made to the database after the TestClass is read into memory. Is there additional configuration that is needed in order to keep the JDBC calls from being made? I am using the latest release versions of entity manager, annotations, etc, and OSCache 2.1.

Thanks in advance for any assistance.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 23, 2007 1:47 am 
Senior
Senior

Joined: Thu May 17, 2007 2:31 am
Posts: 194
Location: Sri Lanka
Hi

use session.load() to retrive object from cache. This will omit jdbc calls


Amila
(Dont' forget to rate if helps)


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.