I am trying to implement Caching through Oracle coherence. My requirement is to place coherence-cache-config.xml in a path and make this override the same file present in jar.
I have mentioned the path in which I have placed customised coherence-cache-config.xml(which I have named as MyConfig.xml) in Arguements under Environment->CoherenceServers->ServerStart. In the same path where I kept MyConfig.xml, I have also kept tangosol-coherence-override.xml. With this tangosol-coherence-override.xml I have created a cluster in weblogic and have associated to the coherence server I am using.
I have successfully started my coherence server through Admin console of weblogic, even then when hit the coherence server for Cache I get "No scheme for cache:"MyCache"". Please suggest me how can I solve this. Same thing if I open the jar and override the coherence-cache-config.xml then it works properly.
Based on Coherence Developer's Guide , there are two ways you can specify a custom path for a cache configuration file:
Setting up configurable-cache-factory-config
in tangosol-coherence-override.xml
file. See example below:
<coherence> <configurable-cache-factory-config> <init-params> <init-param> <param-type>java.lang.String</param-type> <param-value system-property="tangosol.coherence.cacheconfig">MyConfig.xml</param-value> </init-param> </init-params> </configurable-cache-factory-config> </coherence>
Using tangosol.coherence.cacheconfig
as a JVM parameter. Eg java -Dtangosol.coherence.cacheconfig=MyConfig.xml ...
Most probably you have a default cache configuration deployment descriptor loaded.
I would recommend to have it overridden with the tangosol.coherence.cacheconfig
system property specified in your server's start-up script. Eg:
java -Dtangosol.coherence.cacheconfig=/your_local_path/MyConfig.xml
To identify what cache configuration deployment descriptor was loaded, please check your coherence's logs - it should contain the following output:
Loaded cache configuration from resource "file:/your_local_path/MyConfig.xml"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.