[jboss-user] [JBossCache] - Re: EJB3 + JBossCache, accessing from external client
bstansberry@jboss.com
do-not-reply at jboss.com
Thu May 24 14:04:30 EDT 2007
On the server side, use
<property name="hibernate.cache.provider_class">org.jboss.ejb3.entity.TreeCacheProviderHook</property>
That provider knows how to talk to the jboss.cache:service=EJB3EntityTreeCache service.
anonymous wrote : The only references i've found about this indicate that you need to include those three lines above to the hibernate.cfg.xml file in the client side. So i do so. And now everything works.
It's not clear to me from your post whether you want second-level caching on the client side.
1) If you do, sound's like it's at least semi working. You just need to be sure that the JBoss Cache configuration on the client side matches the one on the server side.
2) If you don't, include this in your hibernate.cfg.xml:
<property name="hibernate.cache.use_second_level_cache">false</property>
| <property name="hibernate.cache.use_query_cache">false</property>
Hibernate defaults to 'true' on 'use_second_level_cache' so if you mark any of your entities as cacheable it will throw the exception you posted when you don't configure a provider. Explicitly setting the config to false should get around the problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048436#4048436
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048436
More information about the jboss-user
mailing list