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...
Hope you found this post useful...

...so please read on! I love writing articles that provide beneficial information, tips and examples to my readers. All information on my blog is provided free of charge and I encourage you to share it as you wish. There is a small favour I ask in return however - engage in comments below, provide feedback, and if you see mistakes let me know.

If you want to show additional support and help me pay for web hosting and domain name registration, donations, no matter how small, are always welcome!

Use of any information contained in this blog post/article is subject to this disclaimer.
 
comments powered by Disqus
Other posts you may like...