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 

Joined: Mon Jun 07, 2010 3:21 pm
Posts: 1
Location: Russia
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?

        <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
        <property name="hibernate.connection.url">jdbc:mysql://</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"/>

c3p0.preferredTestQuery=SELECT 1

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

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

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.