Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

Back in September I wrote about using a custom cache configuration file with Coherence. This was achieved by programatically loading the coherence-cache-config.xml file via a ConfigurableCacheFactory. I also mentioned that there was a much simpler way to do this, so lets see that way now.

With WebLogic 12.2, Oracle Coherence has updated names for all of it's system property overrides. The "tangosol" prefix is dropped, leaving for much simpler system property names.

The property we are interested in is...
coherence.cacheconfig


The value of this property needs to be set to the path of the custom Coherence cache configuration file. This should be done in the setUserOverrides script for WebLogic. For example...
 setUserOverrides
EXTRA_JAVA_PROPERTIES="-Dcoherence.cacheconfig=/my/config/coherence-cache-config.xml"


Once that is done, every time WebLogic is started, the Coherence cache configuration will be read from your custom file. This will impact all Coherence applications running in the WebLogic server. You can still use other cache configuration files on a per-application basis if needed though.



-i

A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. Use of any information from my blog posts should be at own risk and I do not hold any liability towards any information misuse or damages caused by following any of my posts.

All content and opinions expressed on this Blog are my own and do not represent the opinions of my employer (Oracle). Use of any information contained in this blog post/article is subject to this disclaimer.
Hi! You can search my blog here ⤵
NOTE: (2022) This Blog is no longer maintained and I will not be answering any emails or comments.

I am now focusing on Atari Gamer.