-->
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: Problem with Hibernate Caching
PostPosted: Tue Sep 21, 2010 6:00 am 
Newbie

Joined: Fri Sep 03, 2010 6:45 am
Posts: 2
Hi all,
my problem is the following: when I added caching to my application server is gone crazy. Hibernate log tells me that objects and queries are cached and the succeeding calls get a "Cache hit", but, in reality, client requests are not satisfied due to expiry.

I really don't know where is the problem. I've tried with two different caching implementations (ehcache and memcached) but the result is the same.

Here is my hibernate.cfg.xml:

Code:
        <property name="transaction.manager_lookup_class">org.hibernate.transaction.SunONETransactionManagerLookup</property>
        <property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
        <property name="cache.use_second_level_cache">true</property>
        <property name="cache.use_query_cache">true</property>

        <!-- Mapping settings -->
        <mapping resource=".../City.hbm.xml"/>
        <mapping resource=".../Country.hbm.xml"/>
        <mapping resource=".../Region.hbm.xml"/>

        <!-- Cache settings -->
        <class-cache class="...City" usage="nonstrict-read-write"/>
        <class-cache class="...Country" usage="nonstrict-read-write"/>
        <class-cache class="...Region" usage="nonstrict-read-write"/>


Queries that I wanna cache are marked as cacheable.

Anyone can help me, please???

Thanks in advance ;)


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.