-->
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: clear cache problem
PostPosted: Mon Jun 07, 2010 3:47 pm 
Newbie

Joined: Mon Jun 07, 2010 3:21 pm
Posts: 1
Location: Russia
Hello!
In my web application data is saved normally , but after getting changed data, it appear such before change.
I suggest what the problem in the cache and tried use :
session.evict(...), evictQueries , etc.
but nothing works.
please help me..what I do wrong?

hibernate.cfg
Code:
<hibernate-configuration>
    <session-factory>
        <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
        <property name="hibernate.connection.url">jdbc:mysql://127.0.0.1:3306/gportal</property>
        <property name="hibernate.connection.username">root</property>
        <property name="hibernate.connection.password">******</property>
        <property name="hibernate.connection.isolation">2</property>
        <property name="hibernate.connection.characterEncoding">utf8</property>

        <property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
        <property name="hibernate.сache.use_second_level_cache">true</property>
        <property name="hibernate.cache.use_query_cache">true</property>
        <property name="hibernate.connection.autocommit">true</property>   
        <property name="hibernate.connection.shutdown">true</property>
        <property name="hibernate.hbm2ddl.auto">update</property>

       <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
       <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
       <property name="hibernate.current_session_context_class">thread</property>

        <property name="hibernate.c3p0.preferredTestQuery">select 1;</property>
        <property name="hibernate.c3p0.min_size">5</property>
        <property name="hibernate.c3p0.max_size">20</property>
        <property name="hibernate.c3p0.timeout">1800</property>
        <property name="hibernate.c3p0.max_statements">50</property>
        <property name="hibernate.c3p0.idle_test_period">10</property>
        <property name="hibernate.c3p0.acquire_increment">5</property>
        <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
     
        <mapping class="org.setupit.gportal.model.Answer"/>
    </session-factory>
</hibernate-configuration>


c3p0.properties
Code:
c3p0.preferredTestQuery=SELECT 1
c3p0.maxConnectionAge=3600
c3p0.testConnectionOnCheckout=true
com.mchange.v2.c3p0.management.ManagementCoordinator=com.mchange.v2.c3p0.management.NullManagementCoordinator


Top
 Profile  
 
 Post subject: Re: clear cache problem
PostPosted: Tue Jun 08, 2010 2:30 pm 
Regular
Regular

Joined: Tue May 11, 2010 5:50 pm
Posts: 54
Location: Norman, Ok, U.S.A
You can try session.flush() or session.clear()


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.