mysqlglassfishsql-updatetoplink-essentials

Getting old values from database, even after update?


I am using MySQL as DB, and Toplink essential as persistence layer.

There is a column, that I used to update regularly. But am always getting the value the value that was there at instance of START of the server.

But I restart the server, then only, its giving me the updated value.

What could be the problem?


Solution

  • I was able to fix the problem by updating Persistence.xml, which allowed to disable any kind of Caching done by toplink.

    <properties>
        <property name="toplink.cache.shared.default" value="false"/>
    </properties>
    

    Refered Link http://docs.oracle.com/cd/B31017_01/web.1013/b28221/cfgdepds005.htm#TopLinkCaching