Joined: Tue Jun 30, 2009 5:10 am Posts: 1				
			 | 
			
				
				
					| 
					
						 Hi All,
   I have used hibernate 3.2ga  and i tries to implement to Ehcache
  I done following things  Hibernate.cfg.xml
 
  	<property name="hibernate.cache.use_second_level_cache">true</property> 		<property name="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</property> 		<property name="net.sf.ehcache.configurationResourceName">/ehcache.xml</property>
 
  at Eache.xml
  <ehcache>     <diskStore path="java.io.tmpdir"/>
    <defaultCache         maxElementsInMemory="10000"         eternal="false"         timeToIdleSeconds="120"         timeToLiveSeconds="120"         overflowToDisk="true"         diskPersistent="false"         diskExpiryThreadIntervalSeconds="120"         memoryStoreEvictionPolicy="LRU"   />            <cache name="com.mymdworld.server.model.MessageConfig"         maxElementsInMemory="300"         eternal="true"         overflowToDisk="false"   />            </ehcache>
  at Messageconfig  DAo file
  Cache(usage = CacheConcurrencyStrategy.READ_WRITE) @Table(name = "MessageConfig") public class MessageConfig { 	
   and i put the ecache.jar  in classpath.
   compliation is sucessed.  When i am trying to the get status of ecashe it show s 0
  stats.setStatisticsEnabled(true); 		System.out.println(" Secondlevel Quische= "+stats.getSecondLevelCacheHitCount()); 		System.out.println(" Query cashe Hit ratio= "+stats.getSecondLevelCacheMissCount());
 
   But it should come  when cache  hits 1.
  Kindly let know why it is not comeing the Hit count?
  Your help was appricted? 
					
  
						
					 | 
				 
				 
			 |