For testing pruposes I tried to disable the SecondLevelCache via the MBean property "SecondLevelCacheEnabled" but I did not work:
<mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=ConfigHibernate"> <attribute name="DatasourceName">java:ConfigV3DS</attribute> <attribute name="Dialect">org.hibernate.dialect.PostgreSQLDialect</attribute> <attribute name="SessionFactoryName">java:/hibernate/ConfigV3SessionFactory</attribute> <attribute name="CacheProviderClass">org.hibernate.cache.HashtableCacheProvider</attribute> <attribute name="Hbm2ddlAuto">update</attribute> <attribute name="ShowSqlEnabled">true</attribute> <attribute name="SecondLevelCacheEnabled">false</attribute> <attribute name="StatGenerationEnabled">true</attribute> </mbean>
2006-07-20 17:50:29,535 INFO [org.hibernate.cfg.SettingsFactory] Second-level cache: enabled