users@glassfish.java.net

Re: GF 3.01 Entity Cache refreshing?

From: emiddio-frontier <emiddio_at_frontier.com>
Date: Mon, 4 Apr 2011 11:11:29 -0700

i had similiar questions also -- solved by...

persistence.xml --

JPA2 has a SHARED-CACHE-MODE element -- you can configure -- mine is set to NONE

JPA1.x has properties relating to cache associated the the provider you
are using -- in mycase eclipselink.cache.shared.default i set to value false

gary

  ----- Original Message -----
  From: Richard Kolb
  To: users_at_glassfish.java.net
  Sent: Monday, April 04, 2011 1:13 AM
  Subject: Re: GF 3.01 Entity Cache refreshing?


  Hi Michael

  I am no expert on the matter, but what is your shared mode in your persistence.xml ?

  If I am reading the below correctly, you would not need to do @Cache modifications if your mode is correct. The cache should be shared in the container.

  http://wiki.eclipse.org/EclipseLink/Examples/JPA/Caching

  Please let me know if it helps or not.

  regards
  Richard.




  On 4 April 2011 09:49, <forums_at_java.net> wrote:

    Hello,

    we have a serious problem with the entity caching of GlassFish 3.0.1. We want
    to run multiple application servers on top of the same database.

    Our Application uses JPA entities with an optimistic locking field of type
    Timestamp.

    After activating the entity cache GlassFish always uses cached instances
    without checking the database for any changes. So one App-server

    does not detect the changes of the others.

    We have played around with the configuration properties "refreshOnlyIfNewer",
    "alwaysRefresh" and "disableHits" without any progress.

     

    Need help! Any hints anybody?

     

    Thanks

    Michael

     


    --

    [Message sent by forum member 'Mag1c']

    View Post: http://forums.java.net/node/788278