2 Replies Latest reply on Nov 17, 2005 4:19 PM by kgabrick

    Why does Portal use Hibernate's HashtableCacheProvider

    kgabrick

      I was looking at the portal 2.0.1 source code and noticed that the Hibernate MBean (SessionBinderFactory) explicitly sets the cache provider to Hibernate's HashtableCacheProvider after reading the config file, overridding any setting I place there.

      Is there a reason this is done instead of using the JBoss Cache provider and hooking the portal's cache into JBoss Cache and its invalidation framework?

      Any reasoning behind this would be helpful to understand.

        • 1. Re: Why does Portal use Hibernate's HashtableCacheProvider

          Actually JBP uses no cache, the HashtableCacheProvider is just here to prevent an error if it would not be present.

          The setting for 2.2 will change and uses EHCache as default cache as JBoss Portal will do more database related operations (like portal object persistence).

          • 2. Re: Why does Portal use Hibernate's HashtableCacheProvider
            kgabrick

            So if I want to use the JBoss tree cache provider with my implementation of the portal, what is the best way to implement this change? I want to get the most upgradability from my solution. Should I subclass the SessionFactoryBinder MBean and replace the offending line in startService(), or is there another more preferred method?

            Thanks.