3 Replies Latest reply on Dec 4, 2007 1:00 PM by manik

    CacheLoader serialization class change

      Hi all,

      I'm currently using JBoss Cache (TreeCache) for replicating configuration data in a WebLogic cluster. We persist the cache using a CacheLoader in to the database. Everything works fine but when I recompile the classes of which instances are stored in the cache, we get serailization errors when the cache is loaded from the database. This because the database contains serialized objects (BLOB). Whenever a class changes it can't be deserialized.

      Does anybody have the same issue? Anybody knows an elegant solution?

        • 1. Re: CacheLoader serialization class change
          manik

          Configuration data should just be primitives, strings, etc., right? Do you also persist custom objects where class definitions change from deployment to deployment?

          • 2. Re: CacheLoader serialization class change

            Yes we do,

            We have a number of small components. These components are deployed on a number of different WebLogic cluster nodes. The components need to be configured at run-time from whitin a central web application. The configuration is stored in a cache whitin the web app and is synchonized to all components running in the cluster.

            To simplify the reconfiguration of the component we have chosen to put custom objects in the cache. So we don't use primitive types directly.

            Is the use of primitives in the cache the only method to avoid the problem we have?

            Thanks,
            Johan,

            • 3. Re: CacheLoader serialization class change
              manik

              For something like this, where the class definitions change from deployment to deployment, the best thing I can think of is to use primitives.