Here is my configuration: Hibernate 3.3.1.GA, JBoss 5.1.0.GA, JBoss Cache 3.2.0.GA.
I'm doing Hibernate configuration as described here: http://www.jboss.org/community/wiki/ClusteredJPAHibernateSecondLevelCachinginJBossAS5
<hibernate-configuration>
<session-factory>
<property name="cache.use_second_level_cache">true</property>
<property name="cache.use_query_cache">true</property>
<property name="cache.region.factory_class">org.hibernate.cache.jbc2.JndiMultiplexedJBossCacheRegionFactoryctory</property>
<property name="cache.region.jbc2.cachefactory>java:CacheManager</property>
<property name="cache.region.jbc2.cfg.entity">mvcc-entity</property>
<property name="cache.region.jbc2.cfg.query">local-query</property>
<property name="cache.region_prefix">tempdb</property>
... other non-caching related configuration
</session-factory>
</hibernate-configuration>
but getting error that specified property is invalid:
Caused by: java.lang.IllegalArgumentException: No such property cache for bean org.jboss.hibernate.jmx.Hibernate available [statisticsServiceName, beanName, defaultSchema, defaultCatalog, sessionFactoryName, querySubstitutions, secondLevelCacheEnabled, password, version, statGenerationEnabled, maxFetchDepth, username, useStructuredCacheEntriesEnabled, datasourceName, dirty, streamsForBinaryEnabled, getGeneratedKeysEnabled, hbm2ddlAuto, minimalPutsEnabled, instance, jdbcBatchSize, jdbcScrollableResultSetEnabled, cacheRegionFactoryClass, dialect, scanForMappingsEnabled, runningSince, cacheRegionPrefix, class, cacheProviderClass, sessionFactoryRunning, batchVersionedDataEnabled, harUrl, queryCacheEnabled, sessionFactoryInterceptor, deployedCacheManagerJndiName, showSqlEnabled, reflectionOptimizationEnabled, jdbcFetchSize, listenerInjector, sqlCommentsEnabled, deployedCacheJndiName, controller]
So, I can not use "cache.region.factory_class" property but only "cacheRegionFactoryClass" (which is shown in exception).
I can not use any other properties like cache.region.* and thus can not configurate second level cache for my hibernate.
Can anyone give me a link how to configurate JBoss Cache 3.2 with JBoss 5.1? I'm especially interested in JndiSharedJBossCacheRegionFactory and JndiMultiplexedJBossCacheRegionFactory.