[jboss-user] [EJB 3.0] - EJB3 2. level cache and query cache question
xinhua
do-not-reply at jboss.com
Mon Mar 5 05:42:29 EST 2007
Hi,
i opened 2.level cache and query cache in persistence.xml like following:
<property name="hibernate.show_sql" value="true" />
| <property name="hibernate.cache.provider_class" value="org.jboss.ejb3.entity.TreeCacheProviderHook"/>
| <property name="hibernate.treecache.mbean.object_name" value="jboss.cache:service=EJB3EntityTreeCache"/>
| <property name="hibernate.cache.use_query_cache" value="true" />
and on an entity:
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
for 2. level cache
and
query.setParameter("vorname", vorname).setParameter("nachname",
| nachname).setMaxResults(maxResults).setFirstResult(firstResult)
| .setHint("org.hibernate.cacheable", new Boolean(true)).setHint("org.hibernate.cacheMode", CacheMode.GET ).setHint("org.hibernate.fetchSize", new Integer(100));
|
for query cache...
but it doese not work :(
can anyone help?
thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025010#4025010
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025010
More information about the jboss-user
mailing list