1 Reply Latest reply: May 20, 2014 12:56 PM by Venkat.Nagi-Oracle RSS

    Seting CacheSetting factory values programmetically

    85579d7a-3e5f-44e0-a5dc-4092a07775e4

      Hi.

      I am using .Net Coherence API to access the Coherence. I have a situation where i should be able to programeticaly configure my .Net Client. I got the required information from the book "Oracle Coherence 3.5: Create Internet-Scale Applications Using Oracle's High Performance Data Grid". As per the book , the below snippet should work


      CacheFactory.SetCacheFactoryConfig(baseUrl + "coherence.xml");

      CacheFactory.SetCacheConfig(baseUrl + "cache-config.xml");

      CacheFactory.SetPofConfig(baseUrl + "pof-config.xml");

       

      Problem is, my cohrerence dll doesn't have the above mentioned methods like "SetCacheFactoryConfig".

      am i missing anything here.where can i find those methods.

       

      Your help is highly appreciated.

        • 1. Re: Seting CacheSetting factory values programmetically
          Venkat.Nagi-Oracle

          These functions are deprecated in 3.7 and later Coherence versions. You can do the same thing by defining new properties.

           

          1. SetCacheConfig(class Tangosol.IO.Resources.IResource) is replaced by the property: IResource DefaultCacheConfigResource
          2. SetCacheConfig(string) is replaced by the property: string DefaultCacheConfigPath
          3. SetCacheFactoryConfig(string) is replaced by the property: string DefaultOperationalConfigPath
          4. SetCacheFactoryConfig(class Tangosol.IO.Resources.IResource) is replaced by the property: IResource DefaultOperationalConfigResource
          5. SetPofConfig(class Tangosol.IO.Resources.IResource) is replaced by the property: IResource DefaultPofConfigResource
          6. SetPofConfig(string) is replaced by the property: string DefaultPofConfigPath

           

          So rather than calling:

           

          SetCacheConfig(string value);


          you simply assign the value to the property:

           

          DefaultCacheConfigPath = value;

           

          Please see below documentation,

          CacheFactory Members