0 Replies Latest reply on Jun 15, 2006 11:02 AM by Daniel Abramovich

    Turning off Second Level cach w/ HibernateMBean

    Daniel Abramovich Newbie

      JBoss 4.0.3 SP1, Hibernate 3.1

      In a single har I have two instances of the JBoss Hibernate MBean sharing the same set of mapping files. I use the two SessionFactories to replicate data between a remote DB and a local DB. I'd like to be able to turn off second level caching for the remote DB SessionFactory but leave it on for the other.

      Does the Hibernate MBean support this? I see it in the API (SecondLevelCacheEnabled), but it doesn't appear to be respected.

      Is there a better way to do this than have to set the CacheMode on every Session I get back from this SessionFactory?