What you tried will disable the L2 cache - a cache which is shared by all EntityManagers which are created by the same EntityManagerFactory. It will not disable the 'L1' cache - the cache each EntityManager maintains for itself.
For example : MyEntity e1 = em.find(MyEntity.class, 1); // fetched from database ... e1 = em.find(MyEntity.class, 1); // fetched from L1 cache. If you need to update e1 you can use the em.refresh() method, or you can call em.clear() to clear the l1 cache and re-run your query. Otherwise we will use the copy from the L1 cache. Is this the behavior you're seeing? -mike On Fri, May 7, 2010 at 12:35 PM, thinkpad33 <[email protected]> wrote: > > I am sorry this is what I tried: > > <property name="openjpa.DataCache" value="false"/> > <property name="openjpa.QueryCache" value="false"/> > > > On Fri, May 7, 2010 at 1:15 PM, Daryl Stultz [via OpenJPA] < > [email protected]<ml-node%[email protected]> > <ml-node%[email protected]<ml-node%[email protected]> > > > > wrote: > > > On Fri, May 7, 2010 at 1:04 PM, thinkpad33 <[hidden email]< > http://user/SendEmail.jtp?type=node&node=5020390&i=0>> > > wrote: > > > > > > > > I want to disable caching, so that every Select query returns fresh > > result > > > from the DB. I don't want to use refresh(). I tried to set the > following: > > > > > > > > > > > > > > But still did not work. > > > > > > Is it just me, or is the thing you tried missing? (I thought maybe > there > > was a spoiler alert, so tried to highlight the blank space to see if > there > > was white text.) > > > > -- > > Daryl Stultz > > _____________________________________ > > 6 Degrees Software and Consulting, Inc. > > http://www.6degrees.com > > mailto:[hidden email]< > http://user/SendEmail.jtp?type=node&node=5020390&i=1> > > > > > > ------------------------------ > > View message @ > > > http://openjpa.208410.n2.nabble.com/Disabling-caching-tp5020333p5020390.html > > To unsubscribe from Disabling caching!, click here< (link removed) >. > > > > > > > > -- > View this message in context: > http://openjpa.208410.n2.nabble.com/Disabling-caching-tp5020333p5020486.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. >
