users@glassfish.java.net

Toplink - Stale Data

From: <glassfish_at_javadesktop.org>
Date: Tue, 06 Jul 2010 03:50:46 PDT

Hi,

        We have deployed our application in clustered mode.Glassfish v2ur2 the appserver
and toplink-essentials persistence provider.A problem we are facing is that the updated entities are not available across the instances, i mean if i make changes to the employee details with one instance ; the updated details are not available in other instances,

 I guess this is due to toplink L2 caching.(Will there be any other causes ?)

We tried using toplink.refresh query hint, as we cannot afford to turn off the shared cache for the entity.Still the problem is not solved seems like it still take the
details from the cache.Am i missing something ? The following is the query that we use
.Please help

em.createQuery("SELECT e FROM Employee e") .setHint("toplink.refresh", "true").getResultList(); (This gives different details in different instances).
[Message sent by forum member 'sreeramsiyer']

http://forums.java.net/jive/thread.jspa?messageID=476858