Link Details

Link 1018057 thumbnail
User 383951 avatar

By tamanm
Published: Aug 21 2013 / 08:30

The default behavior of EntityManager is using cached results from a database query, and you want to force a query to be executed each time a table is loaded, rather than allowing the results of the cache to be displayed. Especially when you are working with database stored procedures, which changes the data on database server, but when you query this data, cached one is displayed, instead of new changed data. There was a solutions by Disabling the cache from persistence.xml or Calling EntityManagerFactory.getCache().evictAll(); method in an Interceptor, I was using this solution. more on article....
  • 3
  • 0
  • 434
  • 609

Add your comment

Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (3)

Voters Against This Link (0)

    Play Framework
    Written by: Ryan Knight
    Featured Refcardz: Top Refcardz:
    1. Akka
    2. Design Patterns
    3. OO JS
    4. Cont. Delivery
    5. HTML5 Mobile
    1. Akka
    2. JUnit/EasyMock
    3. Java Performance
    4. REST
    5. Java