Please post the contents of your persistence.xml file and what version of 
OpenJPA are you using?

Sent from my iPhone

On Aug 28, 2013, at 4:55 PM, tlianza <[email protected]> wrote:

> Hi All,
> 
> My application does many things, but one of it's most frequent JPQL queries
> is this one:
> 
> SELECT m from ImageRepModel m where m._image = :image AND m._type = :type
> 
> On a dev system (with no users), I can see us run this query many times on
> one page - they all go through JPA and hit the database. When I reload the
> page - same thing. None of these results are changing, and yet none of them
> appear to be in the JPA QueryCache. When I inspect the QueryCache
> (OpenJPAEntityManagerFactory getQueryResultCache) I can see hundreds of
> queries in it, many of which match this query on my page.
> 
> Looking at the QueryCache statistics in JMX, it reports no evictions. I've
> also tried various excessively-large parameters to increase the size of the
> query cache (100,000 CacheSize, etc). Still, I'm seeing all of these queries
> hit the db. This is a simple one-box setup, so the
> openjpa.remoteCommitProvider is set to sjvm.
> 
> Any advice for further troubleshooting would be appreciated.
> 
> 
> 
> --
> View this message in context: 
> http://openjpa.208410.n2.nabble.com/Using-QueryCache-still-seeing-queries-sent-to-the-DB-tp7584807.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to