[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Problem disabling Hibernate SecondLevelCache with HibernateM

wolfgang.buckel do-not-reply at jboss.com
Fri Jul 21 03:20:16 EDT 2006

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>

Hibernate still says
2006-07-20 17:50:29,535 INFO  [org.hibernate.cfg.SettingsFactory] Second-level cache: enabled
when my HAR deploys.

I checked the sources of JBoss 4.0.4.GA (which is what I use). In org.jboss.hibernate.jmx.Hibernate.java I couldn't find any line of code where the property "secondLevelCacheEnabled" would be forwarded to Hibernate. The method "transferSettings()" just doesn't do it as with the other properties. Is this a bug?

Any help or workarounds would be appreciated.

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

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

More information about the jboss-user mailing list