-->
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.  [ 1 post ] 
Author Message
 Post subject: Ehcache not working with hibernate 2.1.1
PostPosted: Fri Nov 22, 2013 5:26 am 
Newbie

Joined: Fri Nov 22, 2013 5:22 am
Posts: 1
Hi ,

I have been trying to implement ehcache with Hibernate 2.1.1 into my project .

My configurations are as follows :-
Code:
<prop key="hibernate.cache.provider_class">net.sf.ehcache.hibernate.Provider</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="net.sf.ehcache.configurationResourceName">/ehcache.xml</prop>


My ehcache code

Code:
<?xml version="1.0"?>

<ehcache>
       
<diskStore path="G:/testing/"/>
<defaultCache
       maxElementsInMemory="1000"
       eternal="false"
       timeToIdleSeconds="2200"   
       timeToLiveSeconds="2000"
       overflowToDisk="true"
/>
</ehcache>



Issues :-

1. It's not taking my ehcache.xml but it's taking the default one inside ehcache.jar

HBM's for which i have mentioned
Code:
<cache usage="read-write"/>


files are getting created but there size is always zero.
For query cache also files are created but size zero.

All files have .data at the end


2. if i enable show_sql then every time it is hitting sql means it's hitting DB.

Please help me !!

did i miss anything ???


Actually files are getting created for caching but nothing is getting stored in that
there size is alwasys o

Thanks in advance.

Manish


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.