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?