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

Skip down to comments...
A quick disclaimer...

Although I put in a great effort into researching all the topics I cover, mistakes can happen. If you spot something out of place, please do let me know.

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.
 
comments powered by Disqus
Other posts you may like...