[jboss-user] [EJB 3.0] - Re: query cache configuration

apdo do-not-reply at jboss.com
Thu Dec 4 03:54:13 EST 2008

I found one the following web site: 

that the query must be configure to be cached programatically. According to my testing, it must be done in addition to the configuration in persistence.xml with

  | <property name="hibernate.cache.use_query_cache" value="true"/>

  |     	Query accountQuery = em.createQuery("from Account a where a < 50");
  |     	accountQuery.setHint("org.hibernate.cacheable", true);
  |     	List<Account> accounts = accountQuery.getResultList();

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194244#4194244

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194244

More information about the jboss-user mailing list